B
Boris Pelakh
I'm trying to extract name:value pairs from a string similar to this one
{a:b,c:d,e:f}
The individual pieces are more complicated, but its similar in principal
Here is a test script I use
$f = "a:b,c:d,e:f";
@a = ($f =~ m/(?
\w+)
\w+))(?:,(?
\w+)
\w+)))+/);
print "@a\n";
I should be seeing "a b c d e f", but I am only getting "a b e f",
i.e. the first and last group matched. Why am I not seeing the rest?
Ideally I want to just assign the result of the match to a hash.
-- Boris
{a:b,c:d,e:f}
The individual pieces are more complicated, but its similar in principal
Here is a test script I use
$f = "a:b,c:d,e:f";
@a = ($f =~ m/(?
print "@a\n";
I should be seeing "a b c d e f", but I am only getting "a b e f",
i.e. the first and last group matched. Why am I not seeing the rest?
Ideally I want to just assign the result of the match to a hash.
-- Boris