Perfect email regex finally found
fightingforalostcause.net
Perfect email regex finally found
1–10 of 118 posts
Re: Perfect email regex finally found
#2Re: Perfect email regex finally found
#3How ugly do non-regex based email validation functions look? I've never seen one, but I've always wondered if that was a more elegant solution.
Regex can be easier to read if you have something do a graphical expansion for you. Otherwise, it's write-once, read-never.
Re: Perfect email regex finally found
#4How ugly do non-regex based email validation functions look? I've never seen one, but I've always wondered if that was a more elegant solution.
Re: Perfect email regex finally found
#5How ugly do non-regex based email validation functions look? I've never seen one, but I've always wondered if that was a more elegant solution.
Possibly this approach is too slow to use by itself without a regex. Also maybe there are other problems with this method I'm not aware of?
Re: Perfect email regex finally found
#6Good luck trying to register on any site with it though :)
Re: Perfect email regex finally found
#7How ugly do non-regex based email validation functions look? I've never seen one, but I've always wondered if that was a more elegant solution.
Regex is the only real sensible way to validate strings until something better is found. Even if you just wrote code to do it manually, you'd really just be writing a verbose and poorly implemented finite state machine that globbed symbols together, which in the end, would just be inferior to writing a well tested Regex string. Regex can be easier to read if you have something do a graphical expansion for you. Otherw…
Re: Perfect email regex finally found
#8Users of http://موقع.وزارة-الاتصالات.مصر won't be pleased :)
Re: Perfect email regex finally found
#9How ugly do non-regex based email validation functions look? I've never seen one, but I've always wondered if that was a more elegant solution.
One nice looking trick I've seen is checking the domain of the email address for an MX record. (e.g. http://php.dzone.com/news/php-email-validator-email-mx-d ) Possibly this approach is too slow to use by itself without a regex. Also maybe there are other problems with this method I'm not aware of?
The best way to validate an email remains to be a test email apparently.
Re: Perfect email regex finally found
#10How ugly do non-regex based email validation functions look? I've never seen one, but I've always wondered if that was a more elegant solution.
Regex is the only real sensible way to validate strings until something better is found. Even if you just wrote code to do it manually, you'd really just be writing a verbose and poorly implemented finite state machine that globbed symbols together, which in the end, would just be inferior to writing a well tested Regex string. Regex can be easier to read if you have something do a graphical expansion for you. Otherw…