Re: [PHP] preg_replace and regular expressions.

2007-04-16 Thread Richard Lynch
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:

RE: [PHP] preg_replace and regular expressions.

2007-04-15 Thread Buesching, Logan J
, 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

[PHP] preg_replace and regular expressions.

2007-04-14 Thread Travis Moore
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