Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: regular expression inverse match NOT match?by ww (Archbishop) |
on Sep 25, 2013 at 02:39 UTC ( [id://1055598]=note: print w/replies, xml ) | Need Help?? |
There's really not much wrong with your sample code, if I understand your intent correctly:
If it does the job without side-effects, it's probably correct! But is there some reason you couldn't have answered this yourself... or at least satisfied yourself that your code does or does not work? Update on my oops: TY, Athanasius who pointed out my typo and, implicitly, that -E does not invoke warnings, whose use would have also pointed out my mistook. With a
With the correction, and a more generous example of strings, however, IJW:
Which just goes to say, OP had the "not much wrong" idea.
In Section
Seekers of Perl Wisdom
|
|