http://php.net/preg_replace_all
And be sure to use Ungreedy flag to your pattern:
/pattern/U
On Sat, April 14, 2007 11:22 pm, Travis Moore wrote:
Okay, so what I have is a BB code type of thing for a CMS, which I for
obvious reasons can't allow HTML.
Here's the snippet of my function:
, April 15, 2007 12:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_replace and regular expressions.
Okay, so what I have is a BB code type of thing for a CMS, which I for
obvious reasons can't allow HTML.
Here's the snippet of my function:
function bbCode($str)
{
$db = new _Mysql
Okay, so what I have is a BB code type of thing for a CMS, which I for
obvious reasons can't allow HTML.
Here's the snippet of my function:
function bbCode($str)
{
$db = new _Mysql;
$strOld = $str;
$strNew = $str;
$getRegexs = $db-query(SELECT `regex`,`replace`,`search` FROM
3 matches
Mail list logo