I am trying to match parentheses by puting the parentheses in a character class, but I cannot get it to work. Here is the sample code I am trying to run:
$line = 'hello(()())';
$line =~ /([\(\)]*)/;
print $1."\n";
I would think '(()())' will get printed, but it does not.
Any help/tips will...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.