You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Karsten Gaul <ka...@exedio.com> on 2010/06/29 08:23:21 UTC

Regular Expression Extraction

Hi,

I want to reuse data from a server response and therefore attached a 
regexp extractor to the sampler. Unfortunately, this doesnt seem to work 
since I always get the default value although the string is in the 
response data as can be seen in the results tree.

Maybe my expression is just wrong? I want to have a negative number and 
used the following expression: "(-\d*\.{0,1}\d+)"
Template is $1$ and Match No. 1

Am I missing something?

rgds
Karsten

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


Re: Regular Expression Extraction

Posted by Karsten Gaul <ka...@exedio.com>.
Ok I think the problem is that I get 401s for POST requests. If there 
isnt a proper response, there cant be any matches. I extrated the 
correct values from a different example (GET request).

This will be the topic of a new thread :)

rgds and thx Felix
Karsten

Am 29.06.2010 09:24, schrieb Felix Frank:
> The portions you want to match must be enclosed, so yes, probably (if
> what you posted previously was but a sub-expression, then probably no,
> because you're then nesting parenthesis).
>
> It may be helpful if you could post a skeleton test plan demonstrating
> what you did so far.
>
> Cheers, Felix
>
> On 06/29/2010 09:19 AM, Karsten Gaul wrote:
>> hum the test tool works fine and my regexp matches the strings I feed
>> in. Jmeter still doesnt find it though.
>>
>> Enclosing the regexp with "()" is correct, isnt it?
>

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


Re: Regular Expression Extraction

Posted by Felix Frank <ff...@mpexnet.de>.
The portions you want to match must be enclosed, so yes, probably (if
what you posted previously was but a sub-expression, then probably no,
because you're then nesting parenthesis).

It may be helpful if you could post a skeleton test plan demonstrating
what you did so far.

Cheers, Felix

On 06/29/2010 09:19 AM, Karsten Gaul wrote:
> hum the test tool works fine and my regexp matches the strings I feed
> in. Jmeter still doesnt find it though.
> 
> Enclosing the regexp with "()" is correct, isnt it?

-- 
MPeX.net GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany
MPeXnetworks / www.mpexnetworks.de
Tel: ++49-30-78097 180 / Fax: ++49-30-78097 181

Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 76688
Geschäftsführer: Lars Bräuer, Gregor Lawatscheck

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


Re: Regular Expression Extraction

Posted by Karsten Gaul <ka...@exedio.com>.
hum the test tool works fine and my regexp matches the strings I feed 
in. Jmeter still doesnt find it though.

Enclosing the regexp with "()" is correct, isnt it?

rgds
Karsten


Am 29.06.2010 08:35, schrieb Felix Frank:
> I just found this: http://jakarta.apache.org/oro/demo.html
>
> It looks nifty, but sadly won't quite work with my JRE unter Linux (i
> cannot enter either input text nor a regex). Maybe you have better luck.
>
> Cheers, Felix
>
> On 06/29/2010 08:23 AM, Karsten Gaul wrote:
>> Hi,
>>
>> I want to reuse data from a server response and therefore attached a
>> regexp extractor to the sampler. Unfortunately, this doesnt seem to work
>> since I always get the default value although the string is in the
>> response data as can be seen in the results tree.
>>
>> Maybe my expression is just wrong? I want to have a negative number and
>> used the following expression: "(-\d*\.{0,1}\d+)"
>> Template is $1$ and Match No. 1
>>
>> Am I missing something?
>>
>> rgds
>> Karsten
>>
>> ---------------------------------------------------------------------
>> 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


Re: Regular Expression Extraction

Posted by Felix Frank <ff...@mpexnet.de>.
I just found this: http://jakarta.apache.org/oro/demo.html

It looks nifty, but sadly won't quite work with my JRE unter Linux (i
cannot enter either input text nor a regex). Maybe you have better luck.

Cheers, Felix

On 06/29/2010 08:23 AM, Karsten Gaul wrote:
> Hi,
> 
> I want to reuse data from a server response and therefore attached a
> regexp extractor to the sampler. Unfortunately, this doesnt seem to work
> since I always get the default value although the string is in the
> response data as can be seen in the results tree.
> 
> Maybe my expression is just wrong? I want to have a negative number and
> used the following expression: "(-\d*\.{0,1}\d+)"
> Template is $1$ and Match No. 1
> 
> Am I missing something?
> 
> rgds
> Karsten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 

-- 
MPeX.net GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany
MPeXnetworks / www.mpexnetworks.de
Tel: ++49-30-78097 180 / Fax: ++49-30-78097 181

Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 76688
Geschäftsführer: Lars Bräuer, Gregor Lawatscheck

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