Regex för att validera emailadress

Är absolut inget duktig på RegEx utan förlitar mig alltid på andras uttryck. För att validera email brukar jag använda följande:

[\w\x2E]{2,}\x40{1}[\w\x2E]{2,}\x2E{1}[\w\x2E]{2,}

Blev idag kontaktad av en besökare som hade problem med att skriva in sin hotmail som innehöll ett bindestreck. Hittade ett altenativ som verkar fungera bättre och accepterar bindestreck.

^[\w\.\-_]+@([\w\.\-_]+\.)+[A-Za-z]{2,4}$

Comments

Great information about validating emails.

http://www.janbaskdigitaldesign.com

Thanks for sharing useful information abut email validation.

Best Dental Clinic in Gurgaon,Delhi NCR

Great information about validating emails. thanks for shearing. http://www.onlinepromotionuae.ae

thanks for sharing a fruitful information... www.andamandiscover.com"> www.andamandiscover.comlink text

Great Post, In case you require any help in resolving any technical issue in your epson printer you can immediately call the experts at 0800-098-8371 Epson Printer Help Number UK.

this is outstanding and great post! i really like it. thank you so much.

Toshiba Support UK

Today I learned a lot from your website. thank you,

Microsoft Support

Today I learned a lot from your website. thank you hp support number

Hii, Thanks for the sharing nice posting with us. i’m really impressed.

Thanks for this awesome web page,i’m really impressed.

very nice post i avast customer support like it

This is new dental which provide the best treatment please check it out here. Dental implant in Delhi,Best dentist in delhi, Dentist in south delhi, Skin specialist in delhi link text

Nice one. Bullguard Support Number UK

Please fill out all the fields.

*
*