Page 1 of 1

regex for url & email ??

Posted: Thu Aug 09, 2007 11:09 pm
by PHPycho
Hello forums!!
I need a very good validation for "url" and "email" using regular expression.
Following are the criteria for url:
* may have http or https @ start
* may or may not have www.
* may or may not have query string like ?action=a&pack=p
* may also support for country level domain

Following are the criteria for email:
* info@example.com
* info.us@example.com
* info@example.net.au
* info.us@example.net.au
* may support above formats
Note: regex syntax should be valid for both php and javascript
Any suggestions, comments are warlmy welcome
Thanks in advance to all..

Posted: Fri Aug 10, 2007 1:15 am
by feyd
We have discussions of both fairly regularly. Have you found those threads?

Posted: Tue Aug 14, 2007 10:55 pm
by PHPycho
Knock Knock
Calling for suggestion again..

Posted: Tue Aug 14, 2007 11:40 pm
by feyd
Tap, tap... waiting for you to look up pre-existing threads.....