in reply to Conditional matching into qr variable
If you have another look at perlre you'll see that ?!(mild)) is a look ahead assertion and you need look behind ?<!(mild).
But, at least on my version of perl 5.16 the docs say
"(?<!pattern)" A zero-width negative look-behind assertion. For examp +le "/(?<!bar)foo/" matches any occurrence of "foo" that does not follow "bar". Works +only for fixed-width look-behind.
So you probably need to try a different approach, Try doing your test in 2 phases 1. match lines with active and capture the previous word then 2. skip any line where that word is 'mild' or 'moderate'.
If you show a few example lines of your data then someone here may have a better suggestion.
|
|---|