note 79101 added to function.preg-replace

From: Date: Sun, 11 Nov 2007 04:11:09 +0000
Subject: note 79101 added to function.preg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-132176@lists.php.net to get a copy of this message
I am very sorry...I made some mistakes with my previous post about mailto hyperlinks. I was not adding back in the character which I removed from the beginning, and I also accounted for there optionally being a subject, cc, bcc, and whatever else. Here is a corrected version: $text = preg_replace( "/([\s|\,\>])([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-z" . "A-Z]*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6}" . "\??[A-Za-z0-9\!\@\#\$\%\^\&\*\(\)\_\-\=\+]*)" . "([\s|\.|\,\<])/i", "$1<a href=\"mailto:$2\">$2</a>$3", $text); ---- Server IP: 64.71.164.2 Probable Submitter: 69.149.249.215 ---- Manual Page -- http://www.php.net/manual/en/function.preg-replace.php Edit -- https://master.php.net/note/edit/79101 Del: integrated -- https://master.php.net/note/delete/79101/integrated Del: useless -- https://master.php.net/note/delete/79101/useless Del: bad code -- https://master.php.net/note/delete/79101/bad+code Del: spam -- https://master.php.net/note/delete/79101/spam Del: non-english -- https://master.php.net/note/delete/79101/non-english Del: in docs -- https://master.php.net/note/delete/79101/in+docs Del: other reasons-- https://master.php.net/note/delete/79101 Reject -- https://master.php.net/note/reject/79101 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132176) next »