use strict;
my $str = 'Description: Wales 0-0 Bosnia-Herzegovina<p>It was not <a href="http://www.theguardian.com/football/2014/oct/09/wales-bosnia-chris-coleman-euro-2016-qualifier" title="">the victory that Chris Coleman, his players and the home supporters craved</a> to ignite hopes of qualifying for the European Championships in France but this may well turn out to be a precious point for Wales. Ashley Williams and Hal Robson-Kanu will have sleepless nights about the glorious chances they squandered late on but at the other end of the pitch it was impossible to overlook the outstanding contribution Wayne Hennessey made in goal.</p><p>Unable to get into the Crystal Palace team at the moment, Hennessey produced half a dozen crucial stops here, including a triple save early in the second half and perhaps most memorably of all flicked Miralem Pjanics 30-yard free-kick over the bar eight minutes from time, when the Bosnia playmaker looked to have found the top corner.</p> <a href="http://www.theguardian.com/football/2014/oct/10/wales-bosnia-herzegovina-euro-2016-qualifying">Continue reading...</a>';
my $regex = qr/<[^>]*>/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