#!/usr/bin/ruby
txt='11:Jan:2019 "This is an Example!"'
re1='.*?'
re2='\\d'
re3='.*?'
re4='\\d'
re5='.*?'
re6='\\d'
re7='.*?'
re8='\\d'
re9='.*?'
re10='\\d'
re11='(\\d)'
re12='.*?'
re13=' '
re14='.*?'
re15=' '
re16='.*?'
re17='( )'
re=(re1+re2+re3+re4+re5+re6+re7+re8+re9+re10+re11+re12+re13+re14+re15+re16+re17)
m=Regexp.new(re,Regexp::IGNORECASE);
if m.match(txt)
d1=m.match(txt)[1];
c1=m.match(txt)[2];
puts "("<<d1<<")"<<"("<<c1<<")"<< "\n"
end
|