Hi, I'm still working on my UBB problem from before, but this time I'm needing a large string with spaces.
Here is the code:
$string = eregi_replace(
"[color ([a-z]{3,10})]([a-z0-9])[/color]",
"<span style=\"color: \1;\">\2</span>",
$string);
This works for this 'ubb' code:
[color green]gcolor[/color]
However, this won't work once I add a space. So, this won't work
[color red]text [/color]
or this
[color red]text is good[/color]
etc.
does anyone know how I can make
([a-z0-9]) into an expression that reads whole sentences? (including punctuation?)