Re: how to seek and convert an email address to mailto link
| From: | Pekka Saarinen | Date: | Wed, 20 Mar 2002 11:12:01 +0000 |
| Subject: | Re: how to seek and convert an email address to mailto link | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89312@lists.php.net to get a copy of this message | ||
At 3/20/2002, you wrote:
$newstr = preg_replace('/\b(\S+@\S+)\b/', '<a href="mailto:\1">\1</a>', $oldstr); Take the time to learn Perl-style regular expressions. You can practically write Photoshop with them. miguelThanks! It seems to work fine. If I had time I'd try to learn regexp, but first I'll have to learn how not to be busy all the time. Pekka