See perlre
m/(?:(?!somephrase).)*/;
"A zero-width negative look-ahead assertion. For example /foo(?!bar)/ matches any occurrence of "foo" that isn't followed by "bar". Note however that look-ahead and look-behind are NOT the same thing. You cannot use this for look-behind."
They say that time changes things, but you actually have to change them yourself.
Andy Warhol
In reply to Re: Tell regex to stop at "phrase", instead of char - how?
by JediWizard
in thread Tell regex to stop at "phrase", instead of char - how?
by isync
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |