01-11-2008, 07:15 PM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
BBCode preg_match => str_replace
G'd evening guys,
I'm trying to get a BBCode editor to work.
In code tags for PHP, I've got this;
PHP Code:
[b]This text is bold.[/b] [code]This code [b]however[/b] is not bold, since we want to see the code.[/code]
What is the best way, to recognize if there is any BBCode between the code tags and not transform them, but show them as their are instead of making them strong.
I myself thought first of str_replace, but then you'll need to search into the code tags if ANY BBCode is present...
Anyways, I am out of options so maybe the RegEx specialist or BBCode specialists could help me out.
ReSpawN
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|