Jason Vincent wrote:
>
> 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 =~
Title: Regular Expression Question
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)
{