简体   繁体   English

JMeter使用正则表达式提取javascript事件值

[英]JMeter extract with regular expression a javascript event value

I would like to extract a string this number 1234-1234-1234-1234 plain number, on a Response with Regular Expression Extractor in JMeter *but it wont work i guess because its in ( ) . 我想在JMeter中的带有正则表达式提取器的响应上提取此数字1234-1234-1234-1234的字符串,但我猜它不会工作,因为它在( )
As well duno how to escape or work around. 以及杜诺如何逃脱或解决。

Any ideas? 有任何想法吗?

String to extract example: 要提取的字符串示例:
OnClick="buttonid('1234-1234-1234-1234')"

Regex extract example: 正则表达式提取示例:
OnClick="buttonid('(.+?)')"

试试这个正则表达式:OnClick =“ buttonid('([[^'] +?)')”

我们可以使用简单的正则表达式格式来提取值

Regex : OnClick="buttonid\('(.+)'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM