note 26047 deleted from function.preg-replace by sander
| From: | sander@php.net | Date: | Sat, 15 Feb 2003 15:22:25 +0000 |
| Subject: | note 26047 deleted from function.preg-replace by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43984@lists.php.net to get a copy of this message | ||
this expression is optimized for all expressions. no matter if there is & or ? in the string!
$string =~ s/\s(http:\/\/\S+|www\.\S+|http:\/\/www\.\S+)\s/ <a
href="$1">$1<\/a> /gm;
$string =~ s/\s(\S+@\S+\.\w+)\s/ <a href=mailto:"$1">$1<\/a> /gm;
have fun