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