I hope something like this would help. You can store values
in array and then use the array for any other operations. my
@values; $string =
'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv'; while
($string =~ /XX(\(\w+\))XX/gi) { my
($value) = $1; push
@values, $value; } Thanks & Regards, Sandeep Deshpande -----Original
Message----- If I have a pattern that
appears mulitple times (but I don't know how many times) in a string, how do I
get at the matched text for each of the matches? Made up example… $string =
'ab23cdefgXX(3A5)XXhijkl23mnXX(3)XXopq432rsXX(450b)XXtuv'; If ($string =~
/XX(\w\+)XX/gi){ } Thanks |
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs