On 12/11/2008, Sipathamandla <[EMAIL PROTECTED]> wrote:
> Just tried ur regex pattern, it matches all between characters between
>  the semi colons.
>
>
>  > I've also tried various approaches here, with name and value, parenthesis
>  > for grouping etc, but i always get the default value in my reference
>  > variable.

That means the RE did not match.
It is not affected by grouping brackets.

I just tried the RE and it works for me, so there must be a typo in
it, e.g. trailing space?

>
> you must have at least one set of parenthesis.
>  
> (http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor)

Parentheses are not needed if you use $0$ to return whatever the full
RE matches.

In this case, it might be safer to add ; around the group:

>  regex:      (.{8,8}-.{4,4}-.{4,4}-.{4,4}-.{12,12})

regex:      ;(.{8,8}-.{4,4}-.{4,4}-.{4,4}-.{12,12});

>  template: $1$

in which case $0$ would include the ;;, so the group is needed here.

>  match:     1
>
>  retrieved using ${refName} (didn't specify grouping)
>
>
>

You can test REs using the online ORO demo:

http://jakarta.apache.org/oro/demo.html

Or using a simple test plan with Java Request (put data in ResultData)
and RE Post-Processor, Debug Sampler and View Results Tree.
  
____________________________________________________________________________________________
>
>
>
>
>  2008/11/12 Massas <[EMAIL PROTECTED]>:
>
> >
>  > Hi!
>  >
>  > I'm trying to use the regular expression extractor in order store a 
> response
>  > message in a variable, which i later want to use in a http sampler.
>  >
>  > It feels like I've tried almost everything, but I fail to get the variable
>  > to other than the default value.
>  > The response message i want to parse is in this format:
>  > 4;1aa899f6-73f5-473f-bea4-e102b4366da5;
>  > I want to extract the stuff between the semi colons, and it will always be
>  > at this format. I use the following in the  RE-field:
>  > ".{8,8}-.{4,4}-.{4,4}-.{4,4}-.{12,12}"
>  > I've also tried various approaches here, with name and value, parenthesis
>  > for grouping etc, but i always get the default value in my reference
>  > variable.
>  >
>  > The RE matches what i want when i test it in various web-applications but 
> am
>  > not sure i'm using the extractor correctly (new jMeter user)?
>  >
>  > I've also tried adressing the reference name with _g0 and _g1 etc, but that
>  > doesn't even get the default value.
>  >
>  >
>  >
>  > Help would be highly appreciated!
>  >
>  > regards, Mats
>  > --
>  > View this message in context: 
> http://www.nabble.com/Another-RegEx-Extractor-question.-tp20458864p20458864.html
>  > Sent from the JMeter - User mailing list archive at Nabble.com.
>  >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to