You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Bob Jacoby <RJ...@tceq.state.tx.us> on 2003/12/05 23:45:48 UTC

Re: Using Regular Expression Extractor - UNDERSTOOD

Not resolved, but I at least understand what's going on.

The page I was trying to get to uses a redirect for the first request. Upon searching the archives I found that this is a known issue for response assertions and post processors ( http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg02659.html ). As soon as I directly went to the page it worked properly. My red herring was that I was trying to extract "Java" and "Platform". As my luck would have it the redirect response has "Java" in it which made it seem like it was working for a single group, but actually wasn't.

I appreciate everyone's help!

Thanks,
Bob


>>> mikel@ticketweb.com 12/04/03 11:47AM >>>
I don't use the regexp extractor like that, so I can't tell you what's 
up off the top of my head.  Though you can get what you want, in another 
way, pretty easily.

Clone your extractor.  Have a test1, with a $1$ template, and a test2 
with a $2$ template.

You -might- try setting your template in a single one to:  $1$ $2$, and 
see what happens.

Bob Jacoby wrote:
> Ref Name: test
> Reg Ex: (Java).*?(Platform)
> Template: $1$
> Match No: 1
> Default: hello
> 
> I expected to be able to reference these in my next sampler http request via:
> template = $(test) <expected to be set to "Java">
> firstentry = $(test_g1) <expected to be set to "Java">
> secondentry = $(test_g2) <expected to be set to "Platform">
> 
> However,  the following request is:
> Query Data: template=hello&firstentry=${test_g1}&second=${test_g2}&=
> 
> If I modify the Reg Ex in the extractor to be (Java) rather than (Java).*?(Platform) I get the following:
> Query Data: template=Java&firstentry=Java&second=${test_g2}&=
> 
> I've tested my regex in another tool to make sure that (Java).*?(Platform) does actually have a match in the response from the first request. Am I misunderstanding the docs?


-- 
Mike Lindsey
"Ya know I vass normal once.  I came to work vith a tie and a suit and 
sometimes panfs."


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