From 9a8ed6b392fbcaa0e3dc5cc7c104346707f05103 Mon Sep 17 00:00:00 2001 From: Anil-Kumar Vengalil Date: Mon, 14 Dec 2009 09:42:31 +0000 Subject: [PATCH] hyphen in regular expression needs to be escaped --- PLC/Persons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.0