in reply to Regex won't match.
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex won't match.
by ikegami (Patriarch) on Sep 21, 2009 at 02:19 UTC | |
|
Re^2: Regex won't match.
by Anonymous Monk on Sep 20, 2009 at 22:57 UTC |