#!/usr/bin/perl
$txt='15:Mar:2019 "This is an Example!"';
$re1='.*?';
$re2='([a-z])';
$re3='(a)';
$re4='.*?';
$re5='.';
$re6='.*?';
$re7='.';
$re8='.*?';
$re9='.';
$re10='.*?';
$re11='(.)';
$re=$re1.$re2.$re3.$re4.$re5.$re6.$re7.$re8.$re9.$re10.$re11;
if ($txt =~ m/$re/is)
{
$w1=$1;
$c1=$2;
$c2=$3;
print "($w1) ($c1) ($c2) \n";
}
|