note 77762 added to function.ereg-replace
| From: | alex at macma dot se | Date: | Wed, 12 Sep 2007 09:43:01 +0000 |
| Subject: | note 77762 added to function.ereg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130397@lists.php.net to get a copy of this message | ||
I found out that none of the examples can handle this kind of email to mailto href:
sirname.lastname@mydomain.com
Well, here is the code to do that.
$txt = ereg_replace('[[:alpha:]]+([.]?[[:alpha:]])+@([.]?[[:alnum:]])*','<a
href="mailto:\\0">\\0</a>',$txt);
----
Server IP: 69.147.83.197
Probable Submitter: 90.224.140.217
----
Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php
Edit -- https://master.php.net/note/edit/77762
Del: integrated -- https://master.php.net/note/delete/77762/integrated
Del: useless -- https://master.php.net/note/delete/77762/useless
Del: bad code -- https://master.php.net/note/delete/77762/bad+code
Del: spam -- https://master.php.net/note/delete/77762/spam
Del: non-english -- https://master.php.net/note/delete/77762/non-english
Del: in docs -- https://master.php.net/note/delete/77762/in+docs
Del: other reasons-- https://master.php.net/note/delete/77762
Reject -- https://master.php.net/note/reject/77762
Search -- https://master.php.net/manage/user-notes.php