demonseed
09-04-2002, 08:50 PM
Hi
I had some form validation problems earlier and the user wap3 wrote this regular expression for me:
/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/
I thought it worked perfectly, however.... I am using IE 5.0 at home (whereas Im using 6.0 at work) and it throws an error for every ? in the expression. removing them makes it work again. Why does this happen?
However, It doesn't allow for an email address like help.me@server.com as it wont allow the . left of the @.
I'm reading the Regular Expression page in the Netscape developer thing, but I can't work it out.
Which bit needs to removed to allow for an email address like the one above?
Many thanks in advance
Matt
I had some form validation problems earlier and the user wap3 wrote this regular expression for me:
/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/
I thought it worked perfectly, however.... I am using IE 5.0 at home (whereas Im using 6.0 at work) and it throws an error for every ? in the expression. removing them makes it work again. Why does this happen?
However, It doesn't allow for an email address like help.me@server.com as it wont allow the . left of the @.
I'm reading the Regular Expression page in the Netscape developer thing, but I can't work it out.
Which bit needs to removed to allow for an email address like the one above?
Many thanks in advance
Matt