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.
In reply to Re^2: strange behavior of grep with global match
by ig
in thread strange behavior of grep with global match [resolved]
by ig
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |