Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
If this word my3.exe appears in the line I wish to skip it.
This is the original code
This is how I changed itif (/my background error (\d+): (.+)/ ) { do something with the matched line }
It is still however picking up the records that have "my background error" and "my3.exe" in them. Can somebody pinpoint what I am doing wrong ?if (/my background error (\d+): (.+(?!my3\.exe))/ ) { do something with the matched line }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: negated word issue
by davido (Cardinal) on Mar 01, 2012 at 13:51 UTC | |
by Anonymous Monk on Mar 01, 2012 at 14:01 UTC | |
|
Re: negated word issue
by kcott (Archbishop) on Mar 01, 2012 at 14:20 UTC | |
by Anonymous Monk on Mar 01, 2012 at 17:25 UTC |