使用正则表达式提取器从jmeter响应中提取字符串

bko*_*one 1 regex jmeter

我正在尝试从下面的html响应代码中提取字符串(201&202).到目前为止,我已经尝试了以下正则表达式

punumber=(.+)
Run Code Online (Sandbox Code Playgroud)

但问题是页面上有很多实例,punumber并给我一些我不需要的东西.
我需要的字符串在里面<h3 class="content-title">.

那么有人可以帮我写一个正则表达式来提取h3类中的数量吗?

<h3 class="content-title">
<!--  change when this is completed -->
    <a href="/container/recentIssue.jsp?punumber=201">
    Title 1
    </a>
</h3>

<h3 class="content-title">
<!--  change when this is completed -->
    <a href="/container/mostRecentIssue.jsp?punumber=202">
    Title 1
    </a>                                    
</h3>
Run Code Online (Sandbox Code Playgroud)

UBI*_*ACK 5

这对我有用:

Reference Name : test
Regexp : punumber=([^"]+?)"

Template : $1$

Match No : -1
Run Code Online (Sandbox Code Playgroud)

(这将获得所有值)NV_punumber

使用-1,JMeter将创建:

  • $ {test_1} => 201

  • $ {test_2} => 202