I am parsing date from a pdf document that has other date-like formats
Traceback (most recent call last):
File "/Users/akjain/Documents/workspace/Parse13F/13FParser.py", line 26, in <module>
print dparser.parse(' Crl. A. Nos. 291/16, 300/16, 581/16 & 1143/16 Judgment reserved on : May 31, 2017 ', fuzzy=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 697, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 303, in parse
raise ValueError, "unknown string format"
ValueError: unknown string format
My input is
print dparser.parse(' Crl. A. Nos. 291/16, 300/16, 581/16 & 1143/16 Judgment reserved on : May 31, 2017 ', fuzzy=True)
and if I remove "291/16, 300/16, 581/16 & 1143/16" from the string, the code runs perfectly.
Can anyone help me with parsing date while ignoring above values.