#!/usr/bin/ruby
txt='11:Jan:2019 "This is an Example!"'
re1='(\\d)'
re2='.*?'
re3='an'
re4='.*?'
re5='(an)'
re=(re1+re2+re3+re4+re5)
m=Regexp.new(re,Regexp::IGNORECASE);
if m.match(txt)
d1=m.match(txt)[1];
word1=m.match(txt)[2];
puts "("<<d1<<")"<<"("<<word1<<")"<< "\n"
end
|