jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: beanshell get highest value of a regular expression
Date Tue, 18 Oct 2011 14:36:49 GMT
On 18 October 2011 12:28, dino7777 <pastrva@gmail.com> wrote:
> Hi,
>
> I read out "id" values from a list with regEx, reference name "IDH".
> Now I know, that ${"IDH_matchNr) gives the total number of groups.
>
> I want to extract the highest "id" value for further use.
>
> I tried following beanshell, but no luck:
>
> *count = vars.get("IDH_matchNr");
> new = 1;
> for (i=0; i < count; i++) {

OK.

>    lower = vars.get("IDH_g",i);        // I guess this one does not give me

No, because:
- vars.get() only supports a single parameter - the name of the variable
- anyway, the variable is not called IDH_gn.

The variable names are all documented here:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor_parms
(scroll to the end of the table)

> the current value for the loop
>    if (lower > new) {
>       new = lower;
>    }
> }
> vars.put("IDH",new);
> *
>
> thanks in advance
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/beanshell-get-highest-value-of-a-regular-expression-tp4913331p4913331.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message