go ahead... be a heretic | |
PerlMonks |
Re: User regexpsby Roy Johnson (Monsignor) |
on Jan 14, 2004 at 16:33 UTC ( [id://321294]=note: print w/replies, xml ) | Need Help?? |
How could a user specify a regexp meaning, "Any string that does not have the phrase 'foo' in it?"Abigail gave an elegant one. I would expect this variation to be a little more efficient by virtue of only engaging lookahead upon encountering an f: /^(?:[^f]*f(?!oo))*[^f]*$/s; The PerlMonk tr/// Advocate
In Section
Seekers of Perl Wisdom
|
|