note 19246 added to function.preg-replace
| From: | dellington at thelawyerpages dot com | Date: | Wed, 20 Feb 2002 19:50:34 +0000 |
| Subject: | note 19246 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26863@lists.php.net to get a copy of this message | ||
this is a little different then the EMAIL REPLACE above. the one above works great for all addresses
including xxxx.xxxx@xxx.xxx.xxx.com
but it would include a '.' if your email was at the end of a sentence!!! I.E. "thenk
you john email me at xxx@xxx.com.
$text = preg_replace("/(([\w\.]+))(@)([\w\.]+)\b/i","<a href=\"mailto:$0\">$0</a>",$text);
so I just thought I would post this back for you all to enjoy!!!
PS. If anyone could point me in the right direction to be able to rewrite apache url's to parse
folder names into url variables. i.e.
http://www.QQQ.com/guide/435/543/433 will be
rewritten www.qqq.com/folder/guide.php?cid=435&sid=543&aid=433
thanks in advance
Don
--
http://www.php.net/manual/en/function.preg-replace.php
http://master.php.net/manage/user-notes.php?action=edit+19246
http://master.php.net/manage/user-notes.php?action=delete+19246
http://master.php.net/manage/user-notes.php?action=reject+19246