#!/usr/bin/ruby
txt='08:Nov:2018 "This is an Example!"'
re1='.*?'
re2='(o)'
re3='.*?'
re4='(i)'
re=(re1+re2+re3+re4)
m=Regexp.new(re,Regexp::IGNORECASE);
if m.match(txt)
c1=m.match(txt)[1];
w1=m.match(txt)[2];
puts "("<<c1<<")"<<"("<<w1<<")"<< "\n"
end
|