FuZion
07-09-2007, 02:29 PM
Hello,
I'm having some trouble with preg_replace. Here is the line... (I have tried both of these)
preg_replace( "<\{(.+?)\}>", tab("$1"), $text );
preg_replace( "<\{(\w+)\}>", tab("$1"), $text );
It is supposed to find {anythinginhere}, save the "anythinginhere" in $1 and then replace it with text returned from the tab() function.
Unfortunately, the text is not replaced, and I cannot for the life of me figure out why.. I have used a regex editor and it works fine but when it is run in the script it does not replace anything.
Thanks in advance!
FuZion
I'm having some trouble with preg_replace. Here is the line... (I have tried both of these)
preg_replace( "<\{(.+?)\}>", tab("$1"), $text );
preg_replace( "<\{(\w+)\}>", tab("$1"), $text );
It is supposed to find {anythinginhere}, save the "anythinginhere" in $1 and then replace it with text returned from the tab() function.
Unfortunately, the text is not replaced, and I cannot for the life of me figure out why.. I have used a regex editor and it works fine but when it is run in the script it does not replace anything.
Thanks in advance!
FuZion