in reply to search for matching parentheses

Hi embirath,

It would be easy with a regex:

my $str = "param1(info, blah) param2(new info, more blah)"; while ($str =~ /(\S+\(.*?\))/g) { my $pattern = $1; print "Found pattern '$pattern'\n"; }

except that when you're adding to the equation the ability to detect nested parenthetical groupings (ie. parentheses within parentheses):

Parameter2(new info(DN), blah)

then it makes things a lot more complex.

So you may have to rethink whether that's part of the requirement or not, and if so, how you want to parse it.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/