Reply
The ultimate regex for an email
Old 04-12-2005, 09:57 AM The ultimate regex for an email
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Anyone found/ created one?

Failing that is it possible to poll a mail server with an email address using javascript?

ibbo
__________________
www.nationalclubgolfer.com www.sportspub.co.uk www.bespokecc.co.uk www.centralmarquees.co.uk
Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
When You Register, These Ads Go Away!
Old 04-12-2005, 11:44 AM
Phaedrus's Avatar
Ultra Talker

Posts: 271
Location: CA
How bout this one: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)*\.\w{2,8}$/
__________________
Free Teacher Websites
Phaedrus is offline
Reply With Quote
View Public Profile
 
Old 04-13-2005, 08:43 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Looks like one or two I may have tried lready.

The problem been that I can match most emails addreses but there is always a percentage that fail (even though they are valid).

I suppose I can see if i can open a socket in javascript and see if a response is given aginst the email address for that server.

ibbo
__________________
www.nationalclubgolfer.com www.sportspub.co.uk www.bespokecc.co.uk www.centralmarquees.co.uk
Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 04-13-2005, 10:04 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Try this:

^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 04-13-2005, 08:37 PM
dk01's Avatar
Ultra Talker

Posts: 373
Location: Ames, IA
Javascript is so/so for any kind of verification. If you really want to be spot on try this tutorial.

-dk
__________________
Did I help you? If so, be nice and throw me some TP
dk01 is offline
Reply With Quote
View Public Profile Visit dk01's homepage!
 
Reply     « Reply to The ultimate regex for an email
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14373 seconds with 12 queries