Jump to content

preg_replace for xml correction


Lautarox

Recommended Posts

I was using the xml_parse() function when I've noticed there are some "&" inside the xml tags, like this <> & </>, I was trying to use preg_replace on it, but I couldn't, I've used the pattern "/<(.*)>(.*)&(.*)</(.*)>/" and the replace string "<$1>$2and$3</$4>"; but it doesn't even print the "<>" . Any suggestions?

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/216779-preg_replace-for-xml-correction/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.