If you're removing so much of the data from the string, why not bin it and make a new one. Something like:-
my @out = (); while( m/(book|cover)/g ) { push(@out, $1); } my $newstr = join(" ", @out);
In reply to Re: regexp everything except
by dtr
in thread regexp everything except
by Murcia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |