#!/usr/bin/perl
$txt='14:Mar:2019 "This is an Example!"';
$re1='.*?';
$re2='(M)';
$re3='.*?';
$re4='(h)';
$re5='.*?';
$re6='.';
$re7='.*?';
$re8='.';
$re9='.*?';
$re10='.';
$re11='.*?';
$re12='.';
$re13='.*?';
$re14='(.)';
$re=$re1.$re2.$re3.$re4.$re5.$re6.$re7.$re8.$re9.$re10.$re11.$re12.$re13.$re14;
if ($txt =~ m/$re/is)
{
$c1=$1;
$c2=$2;
$c3=$3;
print "($c1) ($c2) ($c3) \n";
}
|