- or download this
m{
# any of the 12 months:
...
\s? # an optional space between comma and year
[12]\d{3} # a four digit year
}xms
- or download this
m{
# any of the 12 months:
...
(?:<.+?>|\s)* # zero or more tag like things or spaces
[12]\d{3} # a four digit year
}xms
- or download this
if ( $html =~ m{ ( blah blah as above blah blah ) }xms ) {
my $date = $1;
# remove the tags, if there are any
$date =~ s/<.+?>//g;
}