Hello all,
I am attempting to search and replace some xml text using php's regular expression library.
I want to find all occurences of >some alpha text<
withing an xml string and replace with ><font...>some alpha text<
here is what I have so far
php gives Warning: preg_replace() [function.preg-replace]: No ending delimiter '>' found
but a text editor finds all occurence of >< or >text<
any suggestions?
Thanks
I am attempting to search and replace some xml text using php's regular expression library.
I want to find all occurences of >some alpha text<
withing an xml string and replace with ><font...>some alpha text<
here is what I have so far
Code:
pattern = ">[a-zA-Z0-9]*<";
$replace = "><font ...>\\1</font><";
$html = preg_replace($pattern,$replace,$html);
php gives Warning: preg_replace() [function.preg-replace]: No ending delimiter '>' found
but a text editor finds all occurence of >< or >text<
any suggestions?
Thanks