use strict;
my $str = 'Your Balances: <br><br>Points Balance: 600.03<br>
<br>Last Transaction(s)
<br>01/11/2019 100050000000 Location1 $14.00
<br>11/28/2018 100053700000 Location2 $10.50
<br>10/03/2018 100051800000 Location3 $20.00
<br>06/26/2018 100047400000 Location4 $17.50
<br>06/04/2018 100046400000 Location5 $7.00
<br>';
my $regex = qr~(?:\G(?!\A)|\QLast Transaction(s)\E\s+)
\s*<br>\K
(?P<value>.+)~mxp;
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