Help for this page
use strict; my $input=' ... my @arr=$input=~m#<[^<>]+(?:<a>.+?</a>[^<>]*)?>#g; local $"="\n"; print "\n@arr";
<This is sample text> <This is sample text <a>this is sample text</a> sample text >