PCRE: pattern for unicode characters (hex code)

烂漫一生 提交于 2020-01-16 19:39:09

问题


What is the PCRE pattern, in PHP, for characters with hex code from \x00 to \xFF?


回答1:


To match a specific Unicode code point, use \uFFFF where FFFF is the hexadecimal number of the code point you want to match. You must always specify 4 hexadecimal digits. E.g. \u00E0 matches "à", but only when encoded as a single code point U+00E0.

Source: Regex Tutorial



来源:https://stackoverflow.com/questions/17507850/pcre-pattern-for-unicode-characters-hex-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!