note 42708 rejected from function.preg-match by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 26 May 2004 20:00:00 +0000 |
| Subject: | note 42708 rejected from function.preg-match by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-70144@lists.php.net to get a copy of this message | ||
Note Submitter: antoinecailliau@netcourrier.com
----
hello everybody,
sorry for my english but i come from belgium and i'm just 16 years...
I post the regex to detect mail and url.
I found it easy and not sot complicate !
for the url
"#^(http[s]?://)?(www.)?((\w)+).((\w)+)(/(.*?))?$#i"
and for the mail
"#^([a-z0-9.-]*)@([-a-z0-9]+).(\w+)(.*?)$#i"
may be, it exist more simple... i look forward to fresh news !