in reply to How can I build regexp with "not" assertion?
It worked well on Perl v5.8.8$line =~ s/(pattern1)((?!pattern1).)+pattern2.+?\1/substitute/gs;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I build regexp with "not" assertion?
by putnik (Novice) on Feb 22, 2008 at 14:15 UTC |