IE7上的电子邮件验证问题REGEX [英] Email validation problem REGEX on IE7
问题描述
我有一个IE7特殊REGEX问题.
我正在使用以下正则表达式验证电子邮件地址:
Hi, I have an IE7 spesific REGEX problem.
I''m validating Email Address with the following regex:
^\s*[a-zA-Z0-9_\+-]{1,63}(\.[a-zA-Z0-9_\+-]{1,63})*@(?=[a-zA-Z0-9-\.]{0,255}\.?\s*$)[a-zA-Z0-9-]{1,63}(\.[a-zA-Z0-9-]{1,63}){0,126}\.([a-zA-Z]{2,63})\.?\s*$
这适用于所有现代浏览器,但IE7(支持客户想要扩展到页面的浏览器)不适用于fistname.surname@domainname.com
我在IE7中阅读了有关?=之类的前瞻性问题,但建议的更改似乎不起作用?是否有任何正则表达式大师都对如何使IE 7正常工作并在更现代的浏览器版本中保持功能没有任何想法.
This works every modern browser but IE7 (which support customer wants to extend to the page) does not work with f.e fistname.surname@domainname.com
I read about lookahead like "?=" being problem in IE7 but suggested changes do not seem to work? Does any regex guru has any ideas how to get this work with IE 7 and still keep it functional in more modern browser versions.
推荐答案
)[a-zA-Z0 -9-] {1,63}(\.[a-zA-Z0-9-] {1,63}){0,126} \.([a-zA-Z] {2,63})\.? \ s *
)[a-zA-Z0-9-]{1,63}(\.[a-zA-Z0-9-]{1,63}){0,126}\.([a-zA-Z]{2,63})\.?\s*
这适用于所有现代浏览器,但IE7(支持客户想要扩展到页面的浏览器)不适用于fistname.surname@domainname.com
我在IE7中阅读了有关?=之类的前瞻性问题,但建议的更改似乎不起作用?是否有任何正则表达式大师都对如何使IE 7正常工作并在更现代的浏览器版本中保持功能有任何想法.
This works every modern browser but IE7 (which support customer wants to extend to the page) does not work with f.e fistname.surname@domainname.com
I read about lookahead like "?=" being problem in IE7 but suggested changes do not seem to work? Does any regex guru has any ideas how to get this work with IE 7 and still keep it functional in more modern browser versions.
如何访问 ^ ]和查看其他一些电子邮件验证表达式
电子邮件"标签下列出了38个.
How about visiting www.regexlib.com[^] and looking at some of the other email validation expressions
There are 38 listed under ''Email'' tag.
这篇关于IE7上的电子邮件验证问题REGEX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!