Invalid E-mail Characters

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Invalid E-mail Characters

Post by php_wiz_kid »

Can someone give me a list of the characters that are not permitted in e-mail addresses? This will be for e-mail validation. Thanks.
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

I was just SingTFW for Regular Expression stuff and found this: http://examples.oreilly.com/regex/. It might be helpful. Sorry if it's not.

Cheers
Scorphus.
User avatar
mrvanjohnson
Forum Contributor
Posts: 137
Joined: Wed May 28, 2003 11:38 am
Location: San Diego, CA

Post by mrvanjohnson »

Here's the RegEx I ended up using on my form validation for emails

Code: Select all

'/^(їa-zA-Z0-9])+(ї\.a-zA-Z0-9_-])*@(їa-zA-Z0-9_-])+(\.їa-zA-Z0-9_-]+)+/'
Seems to work.
Post Reply