Re: Found the answer!
| From: | Ilja Hehenkamp | Date: | Fri, 10 Nov 2000 23:44:59 +0000 |
| Subject: | Re: Found the answer! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24746@lists.php.net to get a copy of this message | ||
I fixed it allready;
I read that there was a modifier (U) for preg_replace with which you could
turn of the greediness:
$bbcode=preg_replace("/(\[url=)(.*)(])(.*)(\[\/url\])/U", "<a
href=\"\\2\"
target=_blank>\\4</a>",$bbcode);
Works perfect!
Ilja