Interpret user entered dates when part of a search query in Python? -


i'm looking write search algorithm parses date search query string:

for example

query1 = "2014 phone" query2 = "blue sky may 3, 2013" query3 = "telephone equipment 6/7/2004" 

would interpreted as:

string1 = "phone" year1 = "2014" month1 = "" day1 = ""  string2 = "blue sky" year2 = "2013" month2 = "05" day2 = "03"  string3 = "telephone equipment" year3 = "2004" month3 = "06" day3 = "07" 

what's best way in python?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -