allow higher version of regex library

This commit is contained in:
Alex Riina
2015-03-08 00:36:19 -05:00
committed by Alex Riina
parent e3ef622031
commit 215e36e9ed
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ setup(name='talon',
zip_safe=True,
install_requires=[
"lxml==2.3.3",
"regex==0.1.20110315", # handling of .* changes from version 0 to 1
"regex>=1",
"html2text",
"nose==1.2.1",
"mock",

View File

@@ -17,7 +17,7 @@ from talon.signature.constants import SIGNATURE_MAX_LINES
rc = re.compile
RE_EMAIL = rc('@')
RE_RELAX_PHONE = rc('.*(\(? ?[\d]{2,3} ?\)?.{,3}){2,}')
RE_RELAX_PHONE = rc('(\(? ?[\d]{2,3} ?\)?.{,3}?){2,}')
RE_URL = rc(r'''https?://|www\.[\S]+\.[\S]''')
# Taken from:

View File

@@ -43,7 +43,7 @@ VALID_PHONE_NUMBERS = [e.strip() for e in VALID.splitlines() if e.strip()]
def test_match_phone_numbers():
for phone in VALID_PHONE_NUMBERS:
ok_(RE_RELAX_PHONE.match(phone), "{} should be matched".format(phone))
ok_(RE_RELAX_PHONE.search(phone), "{} should be matched".format(phone))
def test_match_names():