[Israel.pm] Regex question: alternation between a delimiter and EOL
Ephraim Dan
E.Dan at F5.com
Wed Jan 24 14:42:58 EET 2007
Yossi writes:
I can't do something like:
/key=(.+?)(;|$)/
although I'd like too...
[edan] Why not? Works fine. Might not be the best regexp (better to use /key=([^;]+)(;|$)/g), but what you wrote works fine (assuming you want to capture the values only, despite saying you want to capture the key=value pairs, but I assume that's not your issue).
What problem are you having with the regexp you wrote?
More information about the Perl
mailing list