[Israel.pm] Regex question: alternation between a delimiter and EOL

Yossi Itzkovich Yossi.Itzkovich at ecitele.com
Wed Jan 24 04:14:00 PST 2007


Hi
 
I have a line like:
key=value;key=value;key=value
 
Each fields ends with ";" except the last one in each line.  value can
not contain ";"
How can I catch the pair of key=value  ?
I can't do something like:
/key=(.+?)(;|$)/
although I'd like too...
 
So how can I do it ?
 
Thanks
 
Yossi
 




More information about the Perl mailing list