You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Liao, Avian" <al...@enporion.com> on 2004/12/06 22:47:09 UTC
question of Regular Expressions
Hi,
I try to use regular Expression Extractor to catch the following:
"3FFBE12D-AA29-B37B-4612-8173B7C2CCE7"
and I use the Regular Expression Extractor:
Reference Name: AAA
Regular Expression: AAA = (\w*-\w*-\w*-\w*-\w*)
Template:$1$
Match No: 0
Default value: No Result
I found out, if there is only one set of this data in the page, my extractor is working fine, and I can catch all the value.However, if I have multiple same set of data in one page, the Regular Expressions Extractor return nothing. When I am said "same set of data", I mean there are couple of same "3FFBE12D-AA29-B37B-4612-8173B7C2CCE7" in the one page, and for my test, I do not care which one I catch (since they are identical), and I just need that value to go on. Besides Regular Expressions Extractor,can we use another sampler or function to catch the value.
I saw the value I need in response data(when I use View Response Tree), and I just cannot catch it.
Alao, if someone know how to catch the same set of data in deisred location( e.g. the third one), I would love to learn.
Thanks!
AL
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: question of Regular Expressions
Posted by sebb <se...@gmail.com>.
On Mon, 6 Dec 2004 16:47:09 -0500, Liao, Avian <al...@enporion.com> wrote:
> Hi,
>
> I try to use regular Expression Extractor to catch the following:
>
> "3FFBE12D-AA29-B37B-4612-8173B7C2CCE7"
>
> and I use the Regular Expression Extractor:
> Reference Name: AAA
> Regular Expression: AAA = (\w*-\w*-\w*-\w*-\w*)
This looks wrong. Does your data really contain strings like:
"AAA = 3FFBE12D-AA29-B37B-4612-8173B7C2CCE7"
Surely you need
(\w+-\w+-\w+-\w+-\w+)
or perhaps
(\w{8}-\w{4}-\w{4}-\w{4}-\w{8})
The JMeter Wiki has a section on Regular Expressions.
> Template:$1$
> Match No: 0
> Default value: No Result
>
> I found out, if there is only one set of this data in the page, my extractor is working fine, and I can catch all the value.However, if I have multiple same set of data in one page, the Regular Expressions Extractor return nothing. When I am said "same set of data", I mean there are couple of same "3FFBE12D-AA29-B37B-4612-8173B7C2CCE7" in the one page, and for my test, I do not care which one I catch (since they are identical), and I just need that value to go on. Besides Regular Expressions Extractor,can we use another sampler or function to catch the value.
>
> I saw the value I need in response data(when I use View Response Tree), and I just cannot catch it.
>
> Alao, if someone know how to catch the same set of data in deisred location( e.g. the third one), I would love to learn.
This is described in the User Manual:
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
see: Match No.
>
> Thanks!
>
> AL
>
> ---------------------------------------------------------------------
> 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