in reply to Matching a pattern which resides within round brackets
I don't see anything wrong with your regex. I tried
print "$1\n$2\n" if $var =~ /^\((.*)\),(.*)$/;
on your string and got
this is a good idea! No it's not
exactly as I would expect.
On a slightly different topic, I would have generally used ([^)]*) rather than (.*) as the first capture. It is more likely to do what you want.
|
|---|