Here are various occurences of regular expressions looking very strongly like email matching regexps I found with grep in the trunk branches:
ack --type=python 're\.(compile|search|match).*@' server/trunk addons/trunk web/trunk/ server/trunk/openerp/addons/base/ir/ir_mail_server.py 123:name_with_email_pattern = re.compile(r'("[^<@>]+")\s*<([^ ,<@]+@[^> ,]+)>') 124:address_pattern = re.compile(r'([^ ,<@]+@[^> ,]+)')
server/trunk/openerp/tools/mail.py 58: part = re.compile(r"(<(([^a<>]|a[^<>\s])[^<>]*)@[^<>]+>)", re.IGNORECASE | re.DOTALL) 487:email_re = re.compile(r"""([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})""", re.VERBOSE) 490:single_email_re = re.compile(r"""^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$""", re.VERBOSE) 498:reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?.*@(.*)>", re.UNICODE)
addons/trunk/survey/wizard/survey_answer.py 704: if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val1) == None: 743: if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val1) == None: 906: if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None: 942: if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
addons/trunk/crm/base_partner_merge.py 741: re_email = re.compile(r".*@")
This badly needs unification and consistency.
Here are various occurences of regular expressions looking very strongly like email matching regexps I found with grep in the trunk branches:
ack --type=python 're\.(compile| search| match). *@' server/trunk addons/trunk web/trunk/ trunk/openerp/ addons/ base/ir/ ir_mail_ server. py with_email_ pattern = re.compile( r'("[^< @>]+")\ s*<([^ ,<@]+@[^> ,]+)>')
server/
123:name_
124:address_pattern = re.compile(r'([^ ,<@]+@[^> ,]+)')
server/ trunk/openerp/ tools/mail. py r"(<(([ ^a<>]|a[ ^<>\s]) [^<>]*) @[^<>]+ >)", re.IGNORECASE | re.DOTALL) r"""([a- zA-Z0-9. _%+-]+@ [a-zA-Z0- 9.-]+\. [a-zA-Z] {2,6})" "", re.VERBOSE) r"""^[a- zA-Z0-9. _%+-]+@ [a-zA-Z0- 9.-]+\. [a-zA-Z] {2,6}$" "", re.VERBOSE) "<.*-open( ?:object| erp)-(\ \d+)(?: -([\w.] +))?.*@ (.*)>", re.UNICODE)
58: part = re.compile(
487:email_re = re.compile(
490:single_email_re = re.compile(
498:reference_re = re.compile(
addons/ trunk/survey/ wizard/ survey_ answer. py "^[a-zA- Z0-9._% -+]+@[a- zA-Z0-9. _%-]+.[ a-zA-Z] {2,6}$" , val1) == None: "^[a-zA- Z0-9._% -+]+@[a- zA-Z0-9. _%-]+.[ a-zA-Z] {2,6}$" , val1) == None: "^[a-zA- Z0-9._% -+]+@[a- zA-Z0-9. _%-]+.[ a-zA-Z] {2,6}$" , val) == None: "^[a-zA- Z0-9._% -+]+@[a- zA-Z0-9. _%-]+.[ a-zA-Z] {2,6}$" , val) == None:
704: if re.match(
743: if re.match(
906: if re.match(
942: if re.match(
addons/ trunk/crm/ base_partner_ merge.py
741: re_email = re.compile(r".*@")
This badly needs unification and consistency.