use strict;
my $str = 'Searchers detect a signal from a missing plane, the U.S. government warns about travel to Europe, and ethical hackers test an organization\'s security.<div class="feedflare">
<a href="http://rss.cnn.com/~ff/services/podcasting/studentnews/rss?a=pczyX_vUQDg:VFcvlifpcAA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/services/podcasting/studentnews/rss?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/services/podcasting/studentnews/rss?a=pczyX_vUQDg:VFcvlifpcAA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/services/podcasting/studentnews/rss?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://rss.cnn.com/~ff/services/podcasting/studentnews/rss?a=pczyX_vUQDg:VFcvlifpcAA:V_sGLiPBpWU"> <img src="http://feeds.feedburner.com/~ff/services/podcasting/studentnews/rss?i=pczyX_vUQDg:VFcvlifpcAA:V_sGLiPBpWU" border="0"></img></a> <a href="http://rss.cnn.com/~ff/services/podcasting/studentnews/rss?a=pczyX_vUQDg:VFcvlifpcAA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/services/podcasting/studentnews/rss?d=qj6IDK7rITs" border="0"></img></a> <a href="http://rss.cnn.com/~ff/services/podcasting/studentnews/rss?a=pczyX_vUQDg:VFcvlifpcAA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/services/podcasting/studentnews/rss?i=pczyX_vUQDg:VFcvlifpcAA:gIN9vFwOqvQ" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/services/podcasting/studentnews/rss/~4/pczyX_vUQDg" height="1" width="1" alt=""/>';
my $regex = qr/[^<>]*/p;
if ( $str =~ /$regex/ ) {
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