#!/usr/bin/perl
$txt='11:Feb:2019 "This is an Example!"';
$re1='.*?';
$re2='(b)';
$re3='.*?';
$re4='((?:(?:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3})))(?![\\d])';
$re=$re1.$re2.$re3.$re4;
if ($txt =~ m/$re/is)
{
$w1=$1;
$year1=$2;
print "($w1) ($year1) \n";
}
|