in reply to Matching a pattern which resides within round brackets
use strict; use warnings; use Data::Dumper; my $var = "(this is a good idea!), No it's not"; if ( $var =~ /^(\(.*\)),(.*)$/ ) { my @args = ($1, $2); print Dumper(\@args); } __END__ $VAR1 = [ '(this is a good idea!)', ' No it\'s not' ];
Also, it would be easier to read your post if you did not use "pre" tags.
|
|---|