Re: help with preg_replace for http://

From: Date: Fri, 29 Mar 2002 20:50:32 +0000
Subject: Re: help with preg_replace for http://
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18047@lists.php.net to get a copy of this message
On Fri, Mar 29, 2002 at 11:46:24AM -0800, Kevin Won wrote: > I'm writing a knowledgebase (basically a content management system) application where > people are adding text via web forms then viewing this data on the web. standard bread-and-butter > kind of stuff. > > of course people want to put in their hyperlinks in the page w/o having to do any sort of html > coding. I'm having a hard time getting my regular expression to work correctly to match for > anything that starts with http:// and ends with a space character, > extracting this as a $string, then formatting the hyperlink as <a > href="$string">$string</a> on the knowledgebase viewing scripts. > > The one I've written matches and replaces only the first instance of > http:// in the string. (which solves problems as long as there is > only one hyperlink in the page ;-) > Have you considered just using a wiki? E.g. www.usemod.com, or http://phpwiki.sourceforge.net/

« previous php.db (#18047) next »