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