Hi,
I just want to thank PHV for all the help with my last couple of AWK questions (especially the quick and accurate code snippets).
I've got another question about pattern matching. I'm trying to identify text within single quotes so I can ignore it when I'm looking for a keyword.
For example I want keyword to be matched but not '..keyword...'.
If I could rely on there being only one set of single quotes on a line then this would be straightforward to implement. Unfortunately, I could have a case of there being several sets of single quotes on a single line i.e.
'some text' and a keyword and 'another keyword here'
Here I'd want to match the first keyword and not the second, but I'm having the problem of the quotes around both being identified and therefore both are being ignored.
I hope someone can help me.
Thanks
I just want to thank PHV for all the help with my last couple of AWK questions (especially the quick and accurate code snippets).
I've got another question about pattern matching. I'm trying to identify text within single quotes so I can ignore it when I'm looking for a keyword.
For example I want keyword to be matched but not '..keyword...'.
If I could rely on there being only one set of single quotes on a line then this would be straightforward to implement. Unfortunately, I could have a case of there being several sets of single quotes on a single line i.e.
'some text' and a keyword and 'another keyword here'
Here I'd want to match the first keyword and not the second, but I'm having the problem of the quotes around both being identified and therefore both are being ignored.
I hope someone can help me.
Thanks