Forum Moderators: coopster

Message Too Old, No Replies

regex for url & email?

         

PHPycho

4:21 am on Aug 10, 2007 (gmt 0)

10+ Year Member



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..

phranque

6:02 am on Aug 10, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



this previous thread should be a good place to start:
[webmasterworld.com...]