Home >Backend Development >PHP Tutorial >PHP中preg_match正则匹配中的/u、/i、/s含义_php技巧

PHP中preg_match正则匹配中的/u、/i、/s含义_php技巧

WBOY
WBOYOriginal
2016-05-16 20:17:251152browse

PHP中preg_match正则匹配的/u /i  /s是什么意思
/u 表示按unicode(utf-8)匹配(主要针对多字节比如汉字)
/i 表示不区分大小写(如果表达式里面有 a, 那么 A 也是匹配对象)
/s 表示将字符串视为单行来匹配

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