Home > Backend Development > PHP Tutorial > php 正则中的 x2dx2ex5f 表示什么?

php 正则中的 x2dx2ex5f 表示什么?

WBOY
Release: 2016-06-06 20:34:41
Original
1301 people have browsed it

preg_match("/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x2d\x2e\x5f]+$/u", $name)

正则中 \x2d\x2e\x5f 表示哪些字符? 有没有一个完整的表可以参考?

回复内容:

preg_match("/^[\x{4e00}-\x{9fa5}A-Za-z0-9\x2d\x2e\x5f]+$/u", $name)

正则中 \x2d\x2e\x5f 表示哪些字符? 有没有一个完整的表可以参考?

<code>echo utf8_decode("\x2d\x2e\x5f");
</code>
Copy after login

其實就是 "-._"

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_...

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template