英文:
How to extract the userkey value when %2F is present in an expression in jmeter
问题
I am creating a script in JMeter for performance testing!
我正在使用JMeter创建性能测试脚本!
I need to get the userkey form the
response header.
我需要从响应头中获取用户密钥。
As we can see below is the short response for the same:
正如我们所看到的,以下是相同的简短响应:
&Userkey=AMfN%2Fm1wlh
And I tried using the below regex:
我尝试使用以下正则表达式:
Userkey=(.+?)\n
Userkey=(.+?)%2F(.+?)\n
But didn't got solution using post processor, i.e. regular expression extractor in JMeter
但是在使用后处理器,即JMeter中的正则表达式提取器时,没有找到解决方案。
英文:
I am creating a script in JMeter for performance testing!
I need to get the userkey form the
response header.
As we can see below is the short response for the same:
&Userkey=AMfN%2Fm1wlh
And I tried using the below regex:
Userkey=(.+?)\n
Userkey=(.+?)%2F(.+?)\n
But didn't got solution using post processor, i.e. regular expression extractor in JMeter
答案1
得分: 0
尝试以下正则表达式:
Userkey=(.*)
其中:
.
- 匹配任何字符*
- 重复()
- 分组
正如您可以在View Results Tree监听器的“RegExp Tester”模式中看到的那样,它会产生一个匹配:
更多信息:
英文:
Try the following regular expression:
Userkey=(.*)
Where:
.
- matches any character*
- repetition()
- grouping
As you can see it produces a match in "RegExp Tester" mode of the View Results Tree listener:
More information:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论