如何使用RegEx从以下响应中提取userId值

时间:2015-01-08 07:17:48

标签: regex jmeter

如何使用RegEx从代码响应中提取userId

{"errorId":0,"errorLongDesc":"Data Successfully saved","errorDesc":"success","user":{"userId":3706}}

1 个答案:

答案 0 :(得分:0)

不建议通过正则表达式进行,但如果找不到其他选项:

(?<="userId":)\d+

演示:https://regex101.com/r/kZ4tQ7/2