函数原型
func (s1 string) bmatches(b1 bytes) bool
参数介绍
举例
-
Response
-
匹配语句:
"root:.*?:[0-9]*:[0-9]*:".bmatches(response.body) -
输出结果:
true -
匹配语句:
"Accept-Enco.*".bmatches(response.raw) -
输出结果:
true
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
bmatches函数主要是用来使用正则表达式 s1 来匹配 b1,并返回 bool 类型匹配结果的
func (s1 string) bmatches(b1 bytes) bool
| 参数名称 | 参数介绍 |
|---|---|
| s1 | 匹配语句 |
| b1 | 待匹配的内容 |
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 07 Jan 2023 10:41:06 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Vary: Accept-Encoding
Cache-Control: no-cache
Content-Length: 373
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
"root:.*?:[0-9]*:[0-9]*:".bmatches(response.body)
true
"Accept-Enco.*".bmatches(response.raw)
true
Was this page helpful?
