JMeter-正则表达式提取器-多行html

JMeter - regular expression extractor - multiple lines of html

本文关键字:多行 html 正则表达式 提取 JMeter-      更新时间:2023-11-03

使用JMeter,我试图从整个HTML响应页面中获取一个特定值,并将其存储为变量。问题是,我需要提取的值在HTML代码的第3行,标识符在第1行。

<td><span class="outputLabel1">Total</span></td> <td><span class="outputText"></span></td> <td width="15%" style="text-align: right;"><span class="outputText">1,068.00</span></td>

我需要从最后一行提取"1068.00",但仍然需要匹配第一行的"Total"。

使用(?s)匹配行。

下面的正则表达式将给出"Total"。

Total(?s).*class="outputText">(.+?)</span>