Fiddler自动响应AutoResponder正则匹配

基本规则:

前缀为“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.gif
http://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.gif
http://www.example.com/Path1/query=example.Gif 
http://www.example.com/Path1/query=example.bmp
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值