This is explained in the JMeter FAQ - or rather, this has a link entitled [OROMatcher 
User's guide] which leads to Perl5 regular
expressions where you will find a section on Perl5 extended regular expressions.

I think this should work:

(?i)<STATUS_ID>(.*?)<\/STATUS_ID>
(I've added the non-greedy operator)

JMeter knows that the contents of the field is a regular expression, so does not need 
the enclosing // which tell Perl that it is an
RE.
This means that the trailing "i" has to be passed in using the extended syntax (which 
also works in Perl, so you can test it there).

S.
----- Original Message ----- 
From: "Shawn Elliott" <[EMAIL PROTECTED]>
To: "'JMeter Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 1:00 AM
Subject: RE: Help with Extracting data from http response.


This is the perl statement I would like to execute.

$string =~ /<STATUS_ID>(.*)<\/STATUS_ID>/i)

So what would I put in the regular expression box?



-----Original Message-----
From: Sebastian Bazley [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 4:51 PM
To: JMeter Users List
Subject: Re: Help with Extracting data from http response.

1. No
2. No
3. See above!

There's some information on Regular Expressions in the JMeter FAQ.

*   means repeat the previous item one or more times.
You probably mean   .*
Better would be    .*?    to make the match not greedy.

S.
----- Original Message ----- 
From: "Shawn Elliott" <[EMAIL PROTECTED]>
To: "'JMeter Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 12:38 AM
Subject: Help with Extracting data from http response.


I need to parse the following out of a HTTP sampler request.

...
<STATUS_ID>1286</STATUS_ID>
...

Would like to just get the value between the two tags.

I think I would use the Regular Expression Extractor to do this, but
have been unsuccessful.

Here is what I have in my REE

NAME: Get Status ID
Reference Name: str_NEW_STATUS_ID
Regular Expression: "<STATUS_ID>*</STATUS_ID>"
Template: status
Match No.(0..) 1
Default Value: 1277

Questions:
1-is my regular expression correct?
2-should the " enclose the expression?
3-why doesn't this work?

-S




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to