If I have a string "Param1=value1;Param2=value2;Param3=val3", how can I get the value between the substrings "Param2=" and the next semicolon (or end of string, whichever comes first)?"
+1
A:
"Param\d+=([^;]*)" will capture the contents between = and ; in group 1
Arnshea
2009-04-22 20:28:28
A:
You can either use a character class that excludes ;
(as others have answered), or you can use a non-greedy match anything:
/Param2=(.*?);/
Chas. Owens
2009-04-22 20:43:09