more useful options | |
PerlMonks |
Re: Range of chars except oneby danger (Priest) |
on Jan 19, 2002 at 23:08 UTC ( [id://140113]=note: print w/replies, xml ) | Need Help?? |
Two ways come to mind. First, like Juerd's, use an assertion (lookbehind in this example):
Or, slightly more complex, remove the exclusion characters from the deletion set first. This should prove more efficient, especially if you are repeatedly applying the deletion regex after you create it:
Either way, it is relatively simple to add or remove characters from your exclusion set. Update: By "slightly more complex" I mean that it entails an extra step on your part --- in truth, I think it is the logically simpler version.
In Section
Seekers of Perl Wisdom
|
|