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