|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-11-27 10:27 UTC] ian dot email at qq dot com
Description:
------------
if(preg_match('/\\u8def/i', "\u535a\u5174\u8def"))
echo 55555;
exit;
Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
Test script:
---------------
if(preg_match('/\\u8def/i', "\u535a\u5174\u8def"))
echo 55555;
exit;
Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
Expected result:
----------------
if(preg_match('/\\u8def/i', "\u535a\u5174\u8def"))
===> echo 55555;
exit;
Actual result:
--------------
if(preg_match('/\\\u8def/i', "\u535a\u5174\u8def")) ? \\\?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 18:00:01 2025 UTC |
if(preg_match('/(\\\)u8def/i', "\u535a\u5174\u8def")) echo 55555; exit; three backslash '\\\' will ok, i should use '\\\'?