preg_replace help needed...

From: Date: Tue, 08 Apr 2003 16:55:46 +0000
Subject: preg_replace help needed...
Groups: php.general 
Request: Send a blank email to php-general+get-142914@lists.php.net to get a copy of this message
For a simple CMS (PHP of course) I'm trying to preg_replace user input of form $str = "Here is a {hl:http://www.test.com/1}link{/hl}. And this is {hl:http://www.test.com/2}another{/hl}."; into 'Here is a <a href="http://www.test.com/1" target="_blank">link</a>. And this is <a href="http://www.test.com/1" target="_blank">another</a>.' I have been trying to get my head around (Perl-Compatible) regular expressions, but I've got a longway to go and I need this functionality asap... Please cc me (digest subscriber), speedfreak

« previous php.general (#142914) next »