I am working with a regexp database that contains expressions with "\uXXXX", which, of course, breaks PHP PCRE.
So, two part question, is there a way to tell PCRE to accept those sequences?
And I got around the issue, luckily it was only the one sequence, by doing:
$regx = str_ireplace('\u00a7', '\xa7', $regx);
but when I was attempting to do:
$regx = preg_replace("/\\u(\w+)/i", "\x$1", $regx);
I was still getting -
Warning: preg_replace() [function.preg-replace]: Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
and it took double escaping the \u => \\\\u, not simply \\u, why is that/is there a better way? Note: I actually had to just do the same thing, and more so, to get the correct string into this post.
update: running 5.3.3 on our server