You don't post your regular expression for us to take a look at it, but I think that you need to use the non greedy operator '?' in your re. Like:
#!/usr/bin/perl -wT use strict; my $s = 'stuff <% junk %> more stuff <% more junk %> end'; print "$s\n"; $s =~ s/<%.*?%>//g; print "$s\n";
Which makes the re to take the shortest match.
HTH
God bless you
rruiz
In reply to Re: A NOT in regular expressions
by rruiz
in thread A NOT in regular expressions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |