admin管理员组

文章数量:1393064

Using JMeter, I am trying to get a specific value from an entire HTML response page and store it as a variable. The problem is that the value I need extracted is on the 3rd line of HTML code with the identifier on the 1st line.

<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>

I am needing to extract the "1,068.00" out of the last line, but still need to match "Total" from the first line.

Using JMeter, I am trying to get a specific value from an entire HTML response page and store it as a variable. The problem is that the value I need extracted is on the 3rd line of HTML code with the identifier on the 1st line.

<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>

I am needing to extract the "1,068.00" out of the last line, but still need to match "Total" from the first line.

Share Improve this question asked Feb 13, 2015 at 19:37 Dustin N.Dustin N. 7951 gold badge15 silver badges35 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Use (?s) to match the line.

Below regular expression would give you the 'Total'.

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

本文标签: javascriptJMeterregular expression extractormultiple lines of htmlStack Overflow