Reputation: 125
I have a response within Jmeter in the form of
r.handleCallback("46","0",["","0","1","2","3"]);
What REGEX can I use to extract just the 0 , 1, 2, or 3 from this string?
I tried this
.?\"0\".?(\"3\")
but this mathces = r.handleCallback("46","0",["","0","1","2","3
and I do not want the preceding string of text nor do I want my target element {0,1,2,3} to be encoding into the REGEX.
Thanks in advance
Upvotes: 0
Views: 214
Reputation: 168157
Configure your Regular Expression Extractor as follows:
foo
(\d+)(?=(?:(?!\[).)*\])
$1$
-1
You will get the following JMeter Variables generated:
foo_1=0
foo_2=1
foo_3=2
foo_4=3
Demo:
References:
Upvotes: 2