#!/usr/bin/ruby
txt='08:Dec:2017 "This is an Example!"'
re1='(08)'
re2='.*?'
re3='[a-z]'
re4='.*?'
re5='[a-z]'
re6='.*?'
re7='[a-z]'
re8='.*?'
re9='[a-z]'
re10='.*?'
re11='([a-z])'
re=(re1+re2+re3+re4+re5+re6+re7+re8+re9+re10+re11)
m=Regexp.new(re,Regexp::IGNORECASE);
if m.match(txt)
day1=m.match(txt)[1];
w1=m.match(txt)[2];
puts "("<<day1<<")"<<"("<<w1<<")"<< "\n"
end
|