jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Match number in regular expression random match
Date Tue, 18 Sep 2007 17:14:21 GMT
On 18/09/2007, Stuart Findlay <stuart.findlay@cp.net> wrote:
> Hi all
>
> In a Regular Expression post-processor with random match number, is
> there a variable set with the match number so subsequent regex's can be
> executed on the same response.

No.

> In the following example "summary" and "field4" are always present but
> the other fields may or may not be:
>
>   {
>      "summary": "summary1",
>      "field1": "field1 text",
>      "field2": "field2 text",
>      "field4": "field4 text"
>   },
>   {
>      "summary": "summary1",
>      "field1": "field1 text",
>      "field2": "field2 text",
>      "field3": "field3 text",
>      "field4": "field4 text"
>   },
>   {
>      "summary": "summary1",
>      "field1": "field1 text",
>      "field3": "field3 text",
>      "field4": "field4 text"
>   },
>
> I need to match "summary" at random with "0" match number and then get
> the corresponding "field4" so if I matched the second group then I would
> like to perform the field4 match with match number "2".
>
> Is such a variable set?

No; you'll need to match field4 at random instead. If necessary add
some previous context to ensure correct matching.

Else match summary at random, and include everything up to field4
text, then use the RE function to extract the text you want.

> Thanks, Stuart
>
>
>
>
> ---------------------------------------------------------------------
> 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