in reply to RegEx: How to negate more than one character?
I recommend reading perlrequick and perlretut to gather some insight on how regular expressions work.
Nevertheless, here's a possible implementation:
yieldsmy $re = qr/(?:a|b)h/; print 'abcdef' !~ $re; print 'ahcdef' !~ $re; print 'abbhef !~ $re;
1 (0) (0)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RegEx: How to negate more than one character?
by lokiloki (Beadle) on Mar 25, 2007 at 23:15 UTC | |
by jettero (Monsignor) on Mar 25, 2007 at 23:34 UTC |