in reply to "everything but" regex
On the other hand, if you want to capture everything that doesn't match, you would have to do something along the lines of$string !~ /whatever/
with the matches around "whatever" being $1 and $2.$string =~ /(.*)whatever(.*)/;
|
---|
Replies are listed 'Best First'. | |
---|---|
(elbie): "everything but" regex
by elbie (Curate) on Aug 17, 2001 at 01:15 UTC |