akoumjian / datefinder

Find dates inside text using Python and get back datetime objects
http://datefinder.readthedocs.org/en/latest/
MIT License
635 stars 167 forks source link

Word Boundaries need to be added #135

Open BillyBonaros opened 4 years ago

BillyBonaros commented 4 years ago

Hi, First of all, great work! I tested all English words adding "20" before every word. I get results for:

'20 am',
 '20 ama',
 '20 amaas',
 '20 Amabel',
...
 20 marsoon
....
'20 montanic'

That means that there are no word boundaries. (AM, MAR, MON in my example). Maybe you can try adding \b at the end of the regular expression?