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