I suppose you could use $np like this:
while (m/\G.*?(\w+)($np)/g) { my $name = $1; # get rid out outermost parens my $value = substr($2,1,length($value)-1); print "name=$name value=$value\n"; }
In reply to Re^2: search for matching parentheses
by smammy
in thread search for matching parentheses
by embirath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |