[ create a new paste ] login | about

Link: http://codepad.org/qMQLn3Ud    [ raw code | output | fork ]

Python, pasted on Apr 24:
1
2
3
4
5
import re

test = re.compile('^\s[0-1]?[0-9]{1}pm \d+ days from (today|yesterday|tomorrow)$')

print test.match(" 12pm 2 days from yesterday")


Output:
1
<_sre.SRE_Match object at 0x4034abe0>


Create a new paste based on this one


Comments: