Reputation: 31
These are the steps, I am working on:
(.+?)(,)
with 'Match no. (0 for Random) value as -1, on 'JMeter variable' from step# 1 above.Web application shows all 35 values, in fact step#1 shows all 35 values in that list as well?
int i;
for (i=1;i<=35;i++) {
int matches = Integer.parseInt(vars.get("Number_" +i));
log.info("Value of matches: " +matches);
}
Upvotes: 0
Views: 52
Reputation: 13980
The last number does not have a comma after it, so it will not match the regex (.+?)(,)
Since you are expecting numbers (and only want to match numbers), I suggest changing your regex extractor to:
Regular Expression: ([0-9]+)
which mean you are extracting one or more occurrences of digits. That way you will be getting (as in your example)
Number_1=4
Number_2=2
Number_3=1
...
Number_35=34
Number_matchNr=35
Upvotes: 0