- see footer for list info -<
I use this regex for email. It's javascript which means you can validate at
the client side and I'll be converting it to cfml shortly for server side
double-checking. It should be 100% compatible.

re =
/^(([A-Za-z0-9']+_+)|([A-Za-z0-9']+\-+)|([A-Za-z0-9']+\.+)|([A-Za-z0-9']+\++))*[A-Za-z0-9']+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/;

It allows ' _ - characters (single quote, underscore, hyphen) which are all
legal for email. Yes, even john.o'[EMAIL PROTECTED] is legal. It also allows
longer TLDs which some outdated rexeg scripts don't accept. e.g. .museum.

Gary.


On 6/21/06, Rich Wild <[EMAIL PROTECTED]> wrote:

>- see footer for list info -<
didn't know there was any bad thinking about it!

I use it all the time to great effect - don't ever get any missed by the
regex.

I'd like to hear if there are any cons to it?

On 6/21/06, Stephen Moretti <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> What's the current thinking on regex for validating an email address?
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
> -<
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to