Home >Backend Development >PHP Tutorial > 正则表达式 字符的概念解决思路

正则表达式 字符的概念解决思路

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 12:55:02916browse

正则表达式 字符的概念
如 \W
与除 A-Z、a-z、0-9 和下划线以外的任意字符匹配。
等效于 [^A-Za-z0-9_]。
----------
这里的任意字符是什么意思?
是键盘上面的字符吗?还是包括一些类似于乱码的字符呢?


------解决方案--------------------
除 A-Z、a-z、0-9 和下划线以外的任意字符

任意可输入的字符
注意字符编码
------解决方案--------------------
是的,你理解对了。其实你自己测试一下就知道了。
Statement:
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