title: How to use two regular expression variable values with match count -1 in ForEach controller
body: <p>How to use two regular expression variable values with match count -1 in ForEach controller.</p>
  
  <p>JMeter version: 3.1</p>
  
  <p>Scenario:
  Questions List page>Each question has unique ID> Need to click each question on the list page and the HTTP request takes two parameters - QuestionID and Title</p>
  
  <p>For this scenario I could achieve for one parameter (title) by using ForEach controller with regular expression match count set to -1.</p>
  
  <p>When I have another RegExp for QuestionID with match count set to -1, how to use in the same ForEach controller since it takes only one input variable and puts that in one output variable. Below is the current test plan structure.</p>
  
  <p>JMeter TestPlan structure:</p>
  
  <p>The HTTP request looks like:
  <code>POST https://test.com:xx/test</code></p>
  
  <p>POST BODY:</p>
  
  <p><code>mode=pr&amp;questionId=454&amp;Title=abcde</code></p>
  
  <p>Here I have to put/get questionId and Title variable values, each title will have unique questionId.</p>
  
  <p>ThreadGroup</p>
  
  <p>--Req1
  --Req2</p>
  
  <p>---RegEx (title): with Match No. -1 (Debug Sampler shows match count: 4)
  `---RegEx (QuestionID): with MAtch No. -1 (Debug sampler shows match count: 2)</p>
  
  <p>Loop Controller</p>
  
  <p>---ForEach Controller (for title input variable)</p>
  
  <p>----HTTP req using ForEach controller's output variable</p>
  
  <p>Run the test> it is able to successfully iterate through title variable values however how to use QuestionID variable also in ForEach controller so that the HTTP request can have both RegExp variables.</p>
  
  <p>Please guide.</p>
  
  <p>Jmeter Version: 4.0
  <a href="https://i.stack.imgur.com/2zVZv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2zVZv.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/zg87L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zg87L.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/4dwtb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4dwtb.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/IO5NJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IO5NJ.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/pBxih.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pBxih.png" alt="enter image description here"></a></p>
  
  <p>Counter-QuesitonID-req:
  <a href="https://i.stack.imgur.com/nAE8Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nAE8Z.png" alt="enter image description here"></a></p>