我正在寻找一种搜索算法来解析搜索查询字符串中的日期:
例如
query1 = "2014 phone"
query2 = "Blue Sky May 3, 2013"
query3 = "Telephone equipment 6/7/2004"
将被解释为:
string1 = "phone"
year1 = "2014"
month1 = ""
day1 = ""
string2 = "Blue Sky"
year2 = "2013"
month2 = "05"
day2 = "03"
string3 = "Telephone equipment"
year3 = "2004"
month3 = "06"
day3 = "07"
在Python中执行此操作的最佳方法是什么?