From: Anil-Kumar Vengalil Date: Mon, 14 Dec 2009 09:42:31 +0000 (+0000) Subject: hyphen in regular expression needs to be escaped X-Git-Tag: PLCAPI-4.3-31~4 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=9a8ed6b392fbcaa0e3dc5cc7c104346707f05103 hyphen in regular expression needs to be escaped --- diff --git a/PLC/Persons.py b/PLC/Persons.py index d5ee82f..bcfd565 100644 --- a/PLC/Persons.py +++ b/PLC/Persons.py @@ -84,7 +84,7 @@ class Person(Row): if not email: raise invalid_email - email_re = re.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+') + email_re = re.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9._\-]+\.[a-zA-Z]+') if not email_re.match(email): raise invalid_email