Just another Perl shrine | |
PerlMonks |
Re: Regex won't match.by Sue D. Nymme (Monk) |
on Sep 20, 2009 at 22:52 UTC ( [id://796439]=note: print w/replies, xml ) | Need Help?? |
Probably what you're doing wrong is assigning the string to the variable wrong. But since you didn't show how you did that, it's just a guess. Usually, what you want to do is this: $TERMSDEF = qr/\b\w+\b|(?:'.+?')|(?:".+?")/; That will preserve all the regex semantics, keep your code readable, cure cancer, etc.
In Section
Seekers of Perl Wisdom
|
|