azizny
06-29-2006, 12:09 PM
I am converting from one system to another, the text on the old system has BB code such as:
PHP CODE[/php:2kiujh345]
[hide:2kiujh345]PHP CODE[/hide:2kiujh345]
and so on, I want to remove the extra :NUMBERS from the text, so I created this:
[php]
$new_text = preg_replace('/(.*)(\[hide.*\])(.*)(\[\/hide.*\])(.*)/i','$1$3$5',$old_text);
problem is that it will pick up on anything containing hide.
any help would be appreciated,
Peace,
PHP CODE[/php:2kiujh345]
[hide:2kiujh345]PHP CODE[/hide:2kiujh345]
and so on, I want to remove the extra :NUMBERS from the text, so I created this:
[php]
$new_text = preg_replace('/(.*)(\[hide.*\])(.*)(\[\/hide.*\])(.*)/i','$1$3$5',$old_text);
problem is that it will pick up on anything containing hide.
any help would be appreciated,
Peace,
