I am very week with regular expressions. It may be too easy for someone.
I have following regular expression
loc_content_re = /(?:([A-Za-z\s:]?):)?([\s\S])/
content = “HYDERABAD/NEW DELHI: Andhra Pradesh chief minister was …”
I wanted to extract “HYDERABAD/NEW DELHI” from above content
match_re = loc_content_re.match(content)
location = $1
plain_content = $2
It shows location nil and plain_content as passed
What will be the regular expression to extract
3 September 2009, 02:57pm IST
" IANS 3 September 2009, 02:57pm IST "