根据在JMeter中使用正则表达式给出的条件选择匹配项

根据在JMeter中使用正则表达式给出的条件选择匹配项

本文介绍了根据在JMeter中使用正则表达式给出的条件选择匹配项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

如果我的答复如下:

{"id":"140","rsd":null,"col":"green","cc":"B5307F","pn":"KENWAY TYRES RENEWAL 2014","loc":"ABD - LR / L3 / L3","isf":"1","isl":"0","tq":"15","pi":null,"st":"1","dsid":"15","cid":"2120","spl":null,"wid":"WI/3ivdfzhg","inv":null,"pdid":"1103","di":"0","pl":"0"}{"id":"141","rsd":null,"col":"green","cc":"B5307F","pn":"KENWAY TYRES RENEWAL 2014","loc":"ABD - LR / L3 / L3","isf":"1","isl":"0","tq":"15","pi":null,"st":"7","dsid":"15","cid":"2120","spl":null,"wid":"WI/3ivdfzhg","inv":null,"pdid":"1103","di":"0","pl":"0"}

,如果我需要check st=7inv=null并仅提取141而不是140.

and if I need to check st=7 and inv=null and extract only 141 not 140.

我该怎么办?预先感谢.

How can I do it? Thanks in advance.

推荐答案

(?=.*?inv":null)(?=(?:(?!st).)*?st":"7)"id":"(\d+)

尝试一下.请参见演示.

Try this.See demo.

http://regex101.com/r/lS5tT3/68

这篇关于根据在JMeter中使用正则表达式给出的条件选择匹配项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 08:00