I'm having some trouble using a 3rd party API, which throws the following PHP error
preg_replace(): Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 42 in /.../SoapClient.php on line 20
Can some one help me with understating what this regex means,
[\x{0}-\x{8}\x{B}-\x{C}\x{E}-\x{1F}\x{D800}-\x{DFFF}]
This is the value it tries to match
5f42caa3-1f41-4ff3-8b6c-3f79e45ed0f1
This is the code bit in the API,
$result = preg_replace('/[\x{0}-\x{8}\x{B}-\x{C}\x{E}-\x{1F}\x{D800}-\x{DFFF}]/u', '', $result);
UPDATE:
By the way I found in the internet making "D"s in the Regex to "E"s will fix the issue, and surpassingly it did fix the issue,
New RegEx,
[\x{0}-\x{8}\x{B}-\x{C}\x{E}-\x{1F}\x{E800}-\x{EFFF}]
But I dont know its a real fix or not, so still my question is valid.