Re: [PHP] Re: url to link

2001-07-30 Thread bill
Hi Matthias, I tried it but it didn't work. It returned a "Document contains no data" error. I put the preg_replace info all on one line. Could that have affected any whitespace? kind regards, bill Matthias Winkelmann wrote: > This uses just one expression (and that is a fast preg_ insteat

RE: [PHP] Re: url to link

2001-07-28 Thread Matthias Winkelmann
This uses just one expression (and that is a fast preg_ insteat of ereg) for both, mailto: and http: links (and news:, too): $text = preg_replace('#(^|[^\"=]{1})(http://|ftp://|mailto:|news:)([^\s<>]+)([\s\n<> ]|$)#sm',"\\1\\2\\3\\4",$text); ciao, matt -- s o m e o n GmbH Community Software