You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Boris Raeschler <br...@objectone.biz> on 2004/10/20 16:08:25 UTC
problem with regular expression
hello friends of jmeter,
i am new with jmeter, which if you ask me is a some kind of a good
software, but i have a problem to extraxt
regular expressions from my response.
one part of my test_plan looks like this:
HTTP - REGUEST ALPHA(Post DATA)
Regular Expression One (cild of beta)
HTTP -REQUEST BETA (POST too)
here is an example for the response from ALPHA
'FullDocView.jsp?hdix=0&pos=0&max=7985&hddukey=1715645(8)&hdpakey=1715636(8)&weg=suchen');"
what i want is to extraxt the values from max(7985), hddukey(1715645(8)
and hdpakey(1715636(8).
ok, my regular expression extractor has following settings:
Reference Name: hddukey (is the first time, that i use this
variable)
RegularExpress: hddukey=[0-9]+\([0-9]\)&
template: <is empty>
Match Number:1
DefaultValue: noValue
is this ok???? i tested the expression with REGEXCOACH
in REQUEST - BETA i reference the variable with
Name: hddukey
Value: ${hddukey}
but the GET REQUEST contains just "hddukey=&hdpakey=&"
ok, what is wrong???
maybe someone has an answer.
THANKS
Boris
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: problem with regular expression
Posted by Boris Raeschler <br...@objectone.biz>.
ok, if got it
i have to write in template $1$
and in Match No. 1
know i have the correct value in my REQUEST
thanks
boris
Boris Raeschler wrote:
> ok, i think my regular expression is now right, i use
>
> .*&hddukey=(\d+\([\d]\))&.*
>
> cause if not he would use my default value(noValue) in GET REQUEST BETA
> but unfortunaly the value is empty....
>
> ok, i insert now a simple template value like AAAAA in the template
> field.
> and in REQUEST - BETA hddukey=AAAAAA.
>
> but he doesnt write my result from regexpression into request
>
> where is my fault????
>
>
>
>
>
>
>
> sebb wrote:
>
>> See http://wiki.apache.org/jakarta-jmeter/RegularExpressions.
>>
>> You need to tell the matcher which part of the pattern
>>
>> hddukey=[0-9]+\([0-9]\)&
>>
>> to return
>>
>> In your case you probably want
>> hddukey=([0-9]+\([0-9]\))&
>>
>> BTW, [0-9] can be expressed as \d
>>
>> On Wed, 20 Oct 2004 16:08:25 +0200, Boris Raeschler
>> <br...@objectone.biz> wrote:
>>
>>
>>> hello friends of jmeter,
>>>
>>> i am new with jmeter, which if you ask me is a some kind of a good
>>> software, but i have a problem to extraxt
>>> regular expressions from my response.
>>>
>>> one part of my test_plan looks like this:
>>>
>>> HTTP - REGUEST ALPHA(Post DATA)
>>> Regular Expression One (cild of beta)
>>>
>>> HTTP -REQUEST BETA (POST too)
>>> here is an example for the response from ALPHA
>>>
>>> 'FullDocView.jsp?hdix=0&pos=0&max=7985&hddukey=1715645(8)&hdpakey=1715636(8)&weg=suchen');"
>>>
>>>
>>> what i want is to extraxt the values from max(7985),
>>> hddukey(1715645(8)
>>> and hdpakey(1715636(8).
>>>
>>> ok, my regular expression extractor has following settings:
>>>
>>> Reference Name: hddukey (is the first time, that i use this
>>> variable)
>>> RegularExpress: hddukey=[0-9]+\([0-9]\)&
>>> template: <is empty>
>>> Match Number:1
>>> DefaultValue: noValue
>>>
>>> is this ok???? i tested the expression with REGEXCOACH
>>>
>>> in REQUEST - BETA i reference the variable with
>>> Name: hddukey
>>> Value: ${hddukey}
>>>
>>> but the GET REQUEST contains just "hddukey=&hdpakey=&"
>>>
>>> ok, what is wrong???
>>>
>>> maybe someone has an answer.
>>>
>>> THANKS
>>> Boris
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: problem with regular expression
Posted by Boris Raeschler <br...@objectone.biz>.
ok, i think my regular expression is now right, i use
.*&hddukey=(\d+\([\d]\))&.*
cause if not he would use my default value(noValue) in GET REQUEST BETA
but unfortunaly the value is empty....
ok, i insert now a simple template value like AAAAA in the template field.
and in REQUEST - BETA hddukey=AAAAAA.
but he doesnt write my result from regexpression into request
where is my fault????
sebb wrote:
>See http://wiki.apache.org/jakarta-jmeter/RegularExpressions.
>
>You need to tell the matcher which part of the pattern
>
> hddukey=[0-9]+\([0-9]\)&
>
> to return
>
>In your case you probably want
>
> hddukey=([0-9]+\([0-9]\))&
>
>BTW, [0-9] can be expressed as \d
>
>On Wed, 20 Oct 2004 16:08:25 +0200, Boris Raeschler
><br...@objectone.biz> wrote:
>
>
>>hello friends of jmeter,
>>
>>i am new with jmeter, which if you ask me is a some kind of a good
>>software, but i have a problem to extraxt
>>regular expressions from my response.
>>
>>one part of my test_plan looks like this:
>>
>>HTTP - REGUEST ALPHA(Post DATA)
>> Regular Expression One (cild of beta)
>>
>>HTTP -REQUEST BETA (POST too)
>> here is an example for the response from ALPHA
>>
>>'FullDocView.jsp?hdix=0&pos=0&max=7985&hddukey=1715645(8)&hdpakey=1715636(8)&weg=suchen');"
>>
>>what i want is to extraxt the values from max(7985), hddukey(1715645(8)
>>and hdpakey(1715636(8).
>>
>>ok, my regular expression extractor has following settings:
>>
>> Reference Name: hddukey (is the first time, that i use this
>>variable)
>> RegularExpress: hddukey=[0-9]+\([0-9]\)&
>> template: <is empty>
>> Match Number:1
>> DefaultValue: noValue
>>
>>is this ok???? i tested the expression with REGEXCOACH
>>
>>in REQUEST - BETA i reference the variable with
>>Name: hddukey
>>Value: ${hddukey}
>>
>>but the GET REQUEST contains just "hddukey=&hdpakey=&"
>>
>>ok, what is wrong???
>>
>>maybe someone has an answer.
>>
>>THANKS
>>Boris
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: problem with regular expression
Posted by sebb <se...@gmail.com>.
See http://wiki.apache.org/jakarta-jmeter/RegularExpressions.
You need to tell the matcher which part of the pattern
hddukey=[0-9]+\([0-9]\)&
to return
In your case you probably want
hddukey=([0-9]+\([0-9]\))&
BTW, [0-9] can be expressed as \d
On Wed, 20 Oct 2004 16:08:25 +0200, Boris Raeschler
<br...@objectone.biz> wrote:
> hello friends of jmeter,
>
> i am new with jmeter, which if you ask me is a some kind of a good
> software, but i have a problem to extraxt
> regular expressions from my response.
>
> one part of my test_plan looks like this:
>
> HTTP - REGUEST ALPHA(Post DATA)
> Regular Expression One (cild of beta)
>
> HTTP -REQUEST BETA (POST too)
> here is an example for the response from ALPHA
>
> 'FullDocView.jsp?hdix=0&pos=0&max=7985&hddukey=1715645(8)&hdpakey=1715636(8)&weg=suchen');"
>
> what i want is to extraxt the values from max(7985), hddukey(1715645(8)
> and hdpakey(1715636(8).
>
> ok, my regular expression extractor has following settings:
>
> Reference Name: hddukey (is the first time, that i use this
> variable)
> RegularExpress: hddukey=[0-9]+\([0-9]\)&
> template: <is empty>
> Match Number:1
> DefaultValue: noValue
>
> is this ok???? i tested the expression with REGEXCOACH
>
> in REQUEST - BETA i reference the variable with
> Name: hddukey
> Value: ${hddukey}
>
> but the GET REQUEST contains just "hddukey=&hdpakey=&"
>
> ok, what is wrong???
>
> maybe someone has an answer.
>
> THANKS
> Boris
>
> ---------------------------------------------------------------------
> 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: problem with regular expression
Posted by Vladimir Tsygankov <Vl...@contera.sp.ru>.
For the "hddukey" case you can try something like that:
.*&hddukey=(\d+\([\d]\))&.*
Vladimir
> -----Original Message-----
> From: Boris Raeschler [mailto:braeschler@objectone.biz]
> Sent: Wednesday, October 20, 2004 6:08 PM
> To: Jmeter User Mailing List
> Subject: problem with regular expression
>
>
> hello friends of jmeter,
>
> i am new with jmeter, which if you ask me is a some kind of a good
> software, but i have a problem to extraxt
> regular expressions from my response.
>
> one part of my test_plan looks like this:
>
> HTTP - REGUEST ALPHA(Post DATA)
> Regular Expression One (cild of beta)
>
> HTTP -REQUEST BETA (POST too)
> here is an example for the response from ALPHA
>
> 'FullDocView.jsp?hdix=0&pos=0&max=7985&hddukey=1715645(8)&hdpa
> key=1715636(8)&weg=suchen');"
>
>
> what i want is to extraxt the values from max(7985),
> hddukey(1715645(8)
> and hdpakey(1715636(8).
>
> ok, my regular expression extractor has following settings:
>
> Reference Name: hddukey (is the first time, that i
> use this
> variable)
> RegularExpress: hddukey=[0-9]+\([0-9]\)&
> template: <is empty>
> Match Number:1
> DefaultValue: noValue
>
> is this ok???? i tested the expression with REGEXCOACH
>
> in REQUEST - BETA i reference the variable with
> Name: hddukey
> Value: ${hddukey}
>
>
> but the GET REQUEST contains just "hddukey=&hdpakey=&"
>
> ok, what is wrong???
>
> maybe someone has an answer.
>
> THANKS
> Boris
>
> ---------------------------------------------------------------------
> 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