Use non greedy match.

This commit is contained in:
Alexey Melnichuk
2015-07-02 19:12:12 +04:00
parent 1764700fd7
commit d7a1829d32

View File

@@ -80,7 +80,7 @@
global $debug;
//fix the xml by escaping the contents of <sip_full_XXX>
$xml_string = preg_replace_callback("/<([^><]+)>(.*[><].*)<\/\g1>/",
$xml_string = preg_replace_callback("/<([^><]+)>(.*?[><].*?)<\/\g1>/",
function ($matches) {
var_dump($matches);
return '<' . $matches[1] . '>' .