in reply to User regexps
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: User regexps
by ysth (Canon) on Jan 14, 2004 at 16:50 UTC | |
by Roy Johnson (Monsignor) on Jan 14, 2004 at 16:59 UTC |