基本规则
前缀为“EXACT:”表示完全匹配(大小写敏感)
无前缀表示基本搜索,表示搜索到字符串就匹配
前缀为“NOT:”表示发现就不匹配
前缀为“REGEX:”表示使用正则表达式匹配
前缀为“REGEX:(?insx)”表示匹配方式其中:
i表示不区分大小写;
n表示指定的唯一有效的捕获是显式命名或编号的形式;
s表示单行模式;
x表示空格说明的;
详细说明:
无前缀:(搜索到字符串就匹配,不区分大小写)
rules | match |
---|---|
* | http://www.example.com/Path1/query=example |
EXAMPLE | http://www.example.com/Path1/query=example |
path1 | http://www.example.com/Path1/query=example |
query | http://www.example.com/Path1/q=Query |
not:发现就不匹配
rules | match |
---|---|
NOT:EXAMPLE | http://www.test.com/Path1/query=test |
NOT:path1 | http://www.example.com/Path2/query=example |
NOT:query | http://www.example.com/Path1/q |
Exact:精确匹配(区分大小写)
rules | match |
---|---|
EXACT:http://www.example.com/path | http://www.example.com/path |
EXACT:http://www.example.com/path | http://www.example.com/Path (不匹配- 大小写不一样) |
EXACT:http://www.example.com/path | http://www.example.com/path/q=Query (不匹配- 子字符串不一样) |
正则表达式:
Fiddler支持以regex:为前缀的正则表达式语法,使用.+匹配一个或多个字符,使用.*匹配0个或多个字符,使用^匹配字符串开始位置,使用$匹配字符串结尾位置。
rules | match |
---|---|
regex:.+ | http://www.example.com/Path1/query=example |
regex:.+.jpg.* | http://www.example.com/Path1/query=foo.jpg&bar http://www.example.com/Path1/query=example.jpg |
regex:.+.jpg | http://www.example.com/Path1/query=foo.jpg&bar (No Match - improper ending) |
http://www.example.com/Path1/query=example.jpg | |
regex:.+.(jpg|gif|bmp)$ | http://www.example.com/Path1/query=foo.bmp&bar (No Match - improper ending) http://www.example.com/Path1/query=example.gifhttp://www.example.com/Path1/query=example.Gif (No Match - mismatched case) http://www.example.com/Path1/query=example.bmp |
regex:(?insx).+.(jpg|gif|bmp)$ | http://www.example.com/Path1/query=foo.bmp&bar (No Match - improper ending) http://www.example.com/Path1/query=example.gifhttp://www.example.com/Path1/query=example.Gif http://www.example.com/Path1/query=example.bmp |