Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 要从Jmeter正则表达式中提取最后一个值吗_Regex_Jmeter_Load Testing - Fatal编程技术网

Regex 要从Jmeter正则表达式中提取最后一个值吗

Regex 要从Jmeter正则表达式中提取最后一个值吗,regex,jmeter,load-testing,Regex,Jmeter,Load Testing,实际匹配情况如下: ============================================ e.g. Match count: 3 Match[1][0]=input type='checkbox' name='sheet_id' value="368"> Match[1][1]=368 Match[2][0]=input type='checkbox' name='sheet_id' value="372"> Match[2][1]=372 Match[3

实际匹配情况如下:

============================================
e.g.

Match count: 3

Match[1][0]=input type='checkbox' name='sheet_id' value="368">
Match[1][1]=368

Match[2][0]=input type='checkbox' name='sheet_id' value="372">
Match[2][1]=372

Match[3][0]=input type='checkbox' name='sheet_id' value="373">
Match[3][1]=373
我使用的正则表达式如下:

====================================
RefName : sheetID

RegEx   : input type='checkbox' name='sheet_id' value="(.+?)">

Template : $1$

Match No : -1

====================================

我使用
${{uuu V(sheetID{sheetID\u matchNr}}}
来获取值,但是我得到的结果是
sheetID\u 0

您的u V函数语法有点不正确

根据:

  • ${A1}-正常工作

  • ${A${N}}-不起作用(嵌套变量引用)

  • ${{uu V(A${N}}}-工作正常。A${N}变成A1,并且{uu V函数返回A1的值

鉴于以下情况:

A=sheetID_
N=sheetID_matchNr
您的函数应该如下所示:

${__V(sheetID_${sheetID_matchNr})}

有关不同JMeter函数的高级信息,请查看posts系列。

我认为与Var Name相关的一些问题 我刚把它改成了getSheetId,现在 ${{getSheetId{getSheetId\u matchNr}}对我来说很好


看起来像是${uuu V(sheetID{uuu${sheetID\u matchNr})得到与上面相同结果的其他问题。单张0