Oct 24, 2000, 4:09 PM
Post #1 of 1
I was wondering if it is possible to match something bounded by word breaks that is not inside certain markers.
regular expressions.. ?
this [abc] is a sample [/abc] test to match the word a in some text.
where this would match "a" that is not inside the [abc] and [/abc] markers
the \b does not work on my version of perl - but the look ahead and look behind? do.
here is what i have so far (it is actually perl replacing $i with $x
$str =~ s/(?<=[\n\f\r ])\Q$i\E(?=[\n\f\r. ])/$x/ig;
( http://www.js-examples.com )