#!/usr/bin/perl
$txt='11:Feb:2019 "This is an Example!"';
$re1='.*?';
$re2='((?:[a-z][a-z0-9_]*))';
$re3='.*?';
$re4='( )';
$re5='(")';
$re=$re1.$re2.$re3.$re4.$re5;
if ($txt =~ m/$re/is)
{
$var1=$1;
$ws1=$2;
$c1=$3;
print "($var1) ($ws1) ($c1) \n";
}
|