On 18 October 2011 15:51, ZK <stevesenio...@gmail.com> wrote: > hi, > you could try this: > > totalMatches = Integer.decode(vars.get("IDH_matchNr")); > int arrSize = totalMatches; > int[] myArray = new int[arrSize]; > > > for (int i = 0; i < myArray.length; i++) > { > myArray[i]=Integer.decode(vars.get("IDH_g"+(i+1))); > } > > Arrays.sort(myArray); > System.out.println("Minimum = " + myArray[0]); > System.out.println("Maximum = " + myArray[myArray.length-1]); > > > /(disclaimer.... I am a tester not a programmer)/
Syntax looks OK, but the generated variable name looks wrong; IDH_g1, IDH_g2 etc. are the groups returned for a single match. If the original poster adds a Debug Sampler after the Regex Extractor, it will be obvious what the variable names are. > > ZK > > -- > View this message in context: > http://jmeter.512774.n5.nabble.com/beanshell-get-highest-value-of-a-regular-expression-tp4913331p4913980.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org