15 Jan
2007
15 Jan
'07
10:31 a.m.
Игорь Микушкин wrote:
Hello!
I wrote the regular expression: ^\s*(?:([A-Za-z_]*)\s*=\s*([A-Za-z0-9_/\.]*)\s*)*$
for splitting lines like: name = abc value1 = def value2 = ghi
I need the result like: match [1] = name match [2] = abc ... match [6] = ghi
But I get ! : match [1] = value2 match [2] = ghi (the last 2 matches)
What is wrong in my expression?
This is normal regular expression behaviour, please see http://www.boost.org/libs/regex/doc/captures.html for an explanation, and possible solution. John.