You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Senthil Subbiah <ss...@ketera.com> on 2004/09/29 20:41:23 UTC

Regular Expression Extractor not identifying the match

I have added a Regular Expression Extractor after a sampler

The sampler has a form value
Value="g00001"
And I want to match this value to send as a part of the next request. 

And in the Regular Expression Extractor, I have added the following

Name : Regular Expression Extractor
Reference Name : _mid
Regular Expression : [a-z]00*[0-9]
Template : $1$
Match No. : 0
Default value : 

In the next request, I have given 
Mid=${_mid}

But when I run the script, the mid param value is not sent.

Is this correct?
I am not sure with the usage of Regular Expression Extractor.
But when I try to search the text with the regular expression....i am
able to find the match.
So please suggest me how to use regular expression extractor.

-senthil

Re: Regular Expression Extractor not identifying the match

Posted by sebb <se...@gmail.com>.
You need to tell the matcher what portion of the regular expression to
return; this is done by adding parentheses around it.

In your case, you presumably want it all, so put:

Regular Expression : ([a-z]00*[0-9])

If you just wanted the numbers, put:

Regular Expression : [a-z](00*[0-9])

and if you want to avoid matching elsewhere in the page, try:

Regular Expression : Value="([a-z]00*[0-9])"

See also:

http://wiki.apache.org/jakarta-jmeter/RegularExpressions

http://wiki.apache.org/jakarta-jmeter/JMeterFAQ#head-838de59592f482b07dd7c7f14a25e3667b8f1863


On Wed, 29 Sep 2004 11:41:23 -0700, Senthil Subbiah <ss...@ketera.com> wrote:
> I have added a Regular Expression Extractor after a sampler
> 
> The sampler has a form value
> Value="g00001"
> And I want to match this value to send as a part of the next request.
> 
> And in the Regular Expression Extractor, I have added the following
> 
> Name : Regular Expression Extractor
> Reference Name : _mid
> Regular Expression : [a-z]00*[0-9]
> Template : $1$
> Match No. : 0
> Default value :
> 
> In the next request, I have given
> Mid=${_mid}
> 
> But when I run the script, the mid param value is not sent.
> 
> Is this correct?
> I am not sure with the usage of Regular Expression Extractor.
> But when I try to search the text with the regular expression....i am
> able to find the match.
> So please suggest me how to use regular expression extractor.
> 
> -senthil
> 
>

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