You can get extracted variables count as ${PlanLinksArray_matchNr}
it will hold the number of variables like:
PlanLinksArray_1
PlanLinksArray_2
PlanLinksArray_3
etc.
If you need to include match groups as well, like
PlanLinksArray_1_g
PlanLinksArray_1_g0
PlanLinksArray_1_g1
etc.
you'll have to do some scripting.
- Add a Beanshell PostProcessor after your Regular Expression extractor
Put the following code into the PostProcessor's "Script" area
JMeterVariables vars = new JMeterVariables();
Iterator iterator = vars.getIterator();
int counter = 0;
while (iterator.hasNext()) {
Map.Entry e = (Map.Entry) iterator.next();
if (e.getKey().startsWith("PlanLinksArray")) {
counter++;
}
}
vars.put("extractedValues", String.valueOf(counter));
- Number of variables which names start with "PlanLinksArray" will be available as
${extractedValues}
variable
See How to use BeanShell: JMeter's favorite built-in component guide for more Beanshell tips and tricks.