in reply to Re: strange behavior of grep with global match
in thread strange behavior of grep with global match [resolved]
Thanks Marshall.
Sorry for not providing more context. I am trying to match 'excpetion:' not followed by 'tex' without using a negative lookahead assertion. See Match with line without a word for the motivation/context. I have alternatives that produce the desired result. At the moment I am trying to understand the behavior of this particular construct, which I don't understand.
I am also interested to learn better/alternative ways of achieving the objective. I would be interested in solutions that exclude strings with 'tex' immediately after 'exception:' and those that exclude 'tex' anywhere after 'exceptions:'. In either case, strings with 'tex' before and not after 'exceptions:' should not be excluded. This is why /exception:/ && !/tex/, though simple, isn't a solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: strange behavior of grep with global match
by moritz (Cardinal) on Aug 07, 2009 at 09:31 UTC | |
|
Re^3: strange behavior of grep with global match
by alexm (Chaplain) on Aug 07, 2009 at 10:49 UTC | |
|
Re^3: strange behavior of grep with global match
by Marshall (Canon) on Aug 07, 2009 at 11:05 UTC |