1

I'm looking to extract 2 expressions from the following response:

"FirstValue":"1234","Someotherfield":"****","Someotherfield":"****",(Some other more fields),"SecondValue":"6789"

Now explained deeply: there is my first value - which is followed by many other values, and eventually my second value. Note: the number of fields between is defined and determined, but I don't use the following solution:How to extract multiple values with a regular expression in Jmeter because I think it will be too long regular expression (about 20 back slashes). I've come up with the following 2 solutions:

Reference name: Parameters
1."FirstValue":"(.+?)"(.+?)"SecondValue":"(.+?)"
2."FirstValue":"(.+?)"*.*"SecondValue":"(.+?)"

Which work fine. But, I want to make it more efficient, since in the response I get also the value between my requested values (e.g. Parameters_g0="FirstValue":"1234","Someotherfield":"****","Someotherfield":"****",(Some other more fields),"SecondValue":"6789"). So question is, is there a more efficient way to use? If no, which one is preferred between what I raised in this post? Thank you

Community
  • 1
  • 1
Testerone
  • 63
  • 4
  • 15
  • According to me, your approach is correct if you want to capture two values in single Regular Expression Extractor. Is there any problem in retrieving those values?. I would suggest to use the second approach, as it is unnecessary to capture the text in the separate group (in the first option). – Naveen Kumar R B Nov 02 '16 at 07:37

0 Answers0