Youll have to use beanshell(or equivalent scripts) as far as I know.
the above approach works if you had to use the templated version as is.and
since you want to find the individual groups , it wont work directly

I would try something like
Sampler
   Regex extractor
For Each
  Sampler
     Bean shell preproc
        get the groups and set it as you want into the sampler using add
argument

You could if you want specify template like $1$~$2$~$4$ and parse it based
on the ~(or whatever delimiter) which keeps your beanshell fairly simple.
Various ways you can do the same thing above (e.g. maintain an index in the
loop and use one of the __ functions to get the group value)

regards
deepak


On Mon, Jun 22, 2009 at 12:25 PM, Stromas, Aaron (NIH/OD) [C] <
stroma...@od.nih.gov> wrote:

> Hello again,
>
> I'm running into a problem with this approach: my RE picks up several
> matching groups and the RE Extractor template looks something like this:
> $1$$2$$4$$5$. I was hoping to use the ForEach controller with an Http
> Request sampler, where the sampler has parameters whose values are the
> results of the RE match. If I define the Reference Name in RE Extractor as
> tuple, I was hoping to use the match results in assigning parameters as
> follows:
>
> Name         Value
> -------------------
> ID           ${tuple_g1}
> Type         ${tuple_g2}
>
> But it turns out I need the loop index as part of the parameter value
> designator:
>
> Name         Value
> -------------------
> ID           ${tuple_1_g1}
> Type         ${tuple_1_g2}
>
> This defeats the whole rational of using the ForEach controller. Am missing
> something again? TIA.
>
> -a
>
> -----Original Message-----
> From: Deepak Shetty 
> [mailtosssss:shet...@gmail.com<mailtosssss%3ashet...@gmail.com>
> ]
> Sent: Monday, June 22, 2009 2:31 PM
> To: JMeter Users List
> Subject: Re: Loop controller question
>
> Hi
> you can with a ForEach Controller
> In Match no specify -1 for the Regex extractor
> Use a Foreach controller and in the input variable prefix specify the
> reference name of the RegEx extractor
> regards
> deepak
>
> On Mon, Jun 22, 2009 at 11:13 AM, Stromas, Aaron (NIH/OD) [C] <
> stroma...@od.nih.gov> wrote:
>
> > Greetings,
> >
> > Is it possible to use the outcome of Regular Expression Post-processor,
> > namely, the number of matches to govern the number of loop executions? I
> > suspect not but would like to know for sure. TIA.
> >
> > -a
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
>
>

Reply via email to