[IMP] res_partner regex: added more support to the name.

bzr revid: tde@openerp.com-20120719150725-sas4xjbj492hv3pb
This commit is contained in:
Thibault Delavallée 2012-07-19 17:07:25 +02:00
parent 06fdb65695
commit 81e6449e57
1 changed files with 2 additions and 2 deletions

View File

@ -314,10 +314,10 @@ class res_partner(osv.osv):
- anything else: fall back on the default name_create
Regex :
- ([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}): raoul@grosbedon.fr
- ([\w|\.|\s]+)[\<]([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})[\>]:
- ([\w\s.\\-]+)[\<]([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})[\>]:
Raoul Grosbedon, raoul@grosbedon.fr
"""
contact_regex = re.compile('([\w|\.|\s]+)[\<]([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})[\>]')
contact_regex = re.compile('([\w\s.\\-]+)[\<]([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})[\>]')
email_regex = re.compile('([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})')
contact_regex_res = contact_regex.findall(name)
email_regex_res = email_regex.findall(name)