use strict;
my $str = '{[Response[attributes={Status=Success, action=Retrieve}; value=[NameList[attributes={PropertyName=Name}; value=[Names[attributes={}; value=[SimplePair[attributes={Key=-, Value=-}; value=[]], SimplePair[attributes={Key=Preferences, Value=Preferences}; value=[]], SimplePair[attributes={Key=&DEFAULT_PREFERENCE, Value=Default}; value=[]], SimplePair[attributes={Key=Profile, Value=Profile}; value=[]], SimplePair[attributes={Key=Duty Manager, Value=Duty Manager}; value=[]], SimplePair[attributes={Key=Mode User, Value=Mode User}; value=[]], SimplePair[attributes={Key=ModeDisplay Profile, Value=Mode Display Profile}; value=[]], SimplePair[attributes={Key=Mode Manager, Value=Mode Manager}; value=[]], SimplePair[attributes={Key=Professional Employees, Value=Professional Employees}; value=[]], SimplePair[attributes={Key=Scheduler, Value=Scheduler}; value=[]], SimplePair[attributes={Key=Super Access, Value=Super Access}; value=[]], SimplePair[attributes={Key=keeper, Value=keeper}; value=[]], SimplePair[attributes={Key=Manager, Value=Manager}; value=[]]]]]]]]]}';
my $regex = qr/(?<=Value=).*?(?=})/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html