: vb Code help!


cyberseth
I'm using "UBB code" (equiv vB code on this site) on my website but I seem to have run into a few problems with my regexps! Here is what mine looks like:

$content=eregi_replace("\\[b\\](.*)\\[/b\\]","<b>\\1</b>",$content);

And here is an example of what it looks like...
http://www.muscle-power.net/viewtopic.php?topicid=29&forumid=1000

Can you help?

Xelopheris
1. Use preg_replace instead
2. At the end of your first string, (still inside the quotes) put /siU
s = Accepts New Lines
i = Case doesn't matter
U = ungreedy, meaning it will go to the first match in the string instead of the last.