[英]Jmeter - regular expression to extract value
I am somewhat new to regular expressions.I am trying to capture a value using a regular expression extractor that appears to be encapsulated in '\\'. 我对正则表达式有些陌生,我正在尝试使用似乎封装在'\\'中的正则表达式提取器捕获值。 Since \\ and " are special character in Perl, how would I extract this value?
由于\\和“在Perl中是特殊字符,我将如何提取该值?
The value comes out of the HTML like this: 该值来自HTML,如下所示:
state_hiddenfld_value=\\"504634900\\"
state_hiddenfld_value = \\ “504634900 \\”
I already have an extractor that works for the name; 我已经有一个可以使用该名称的提取器; do I need to include that as well?
我还需要包括吗?
I have tried this extractor: 我已经尝试过这个提取器:
Regular Expression: state_hiddenfld_value="\\"(.+?)\\" Template: $1$ Match No.: 1 Default Value:VSTABLEID_NOT_FOUND 正则表达式:state_hiddenfld_value =“ \\”(。+?)\\“模板:$ 1 $匹配编号:1默认值:VSTABLEID_NOT_FOUND
I'm not sure if I need something else in my regular expression. 我不确定我的正则表达式中是否还需要其他内容。
我们可以使用以下正则表达式
state_hiddenfld_value=\\"(.+)"
正则表达式应为
state_hiddenfld_value=\\"(.+?)\\"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.