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