Preg_match()函数
preg_match函数用于执行一个正则表达式匹配
int preg_match($pattern,$subject,array $matches)
- $pattern:要搜索的模式,字串形式
- $subject:输入字符串
- $matches:如果提供了参数matches,它将被填充为搜索结果。
返回值
返回pattern的匹配次数,他的值将是0次或1次,应为preg_match()在第一次匹配后将会停止搜索。preg_match_all()不同于此,它会一直搜索subject直到结尾。如果发生错误preg_match返回false
preg_match非\s模式绕过:
- url编码绕过
- 异或绕过 json_decode
- 取反绕过