Sebb,
Thanks for your speedy reply. However, the exp below includes 'token='
in the match. So, if store the result in ${tokenVal} and then use that
as parameter *value*, the next POST request will contain:
token=token=abcd123
instead of
token=abcd123.
How can I omit 'token=' in value returned by regexp extractor?
thanks again,
-nikita
sebb wrote:
JMeter uses ORO; see the Wiki for some more details, also:
http://jakarta.apache.org/oro/api/org/apache/oro/text/regex/package-summary.html
It seems look-behind is not supported.
However, you don't need look-behind here.
Try
token=(.+?)\s
i.e. match all but newline and keep matching until the 1st white-space.
[The ? stops the pattern from being greedy).
and set the template to $1$
You might possibly have to add ? at the end, i.e.
token=(.+?)\s?
if the token value is the last thing in the response.
S.
On 31/05/06, Nikita Tovstoles <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to extract a 'token=' value from an http response using
regular expression extractor. The idea, of course, is to supply the
value as post param in subsequent requests:
((?<=token=)[^\n^ ]*)
will return token value (without 'token='); i.e. when above is
applied to:
token=1431535/+sfafa
it will return '1431535/+sfafa'
I tested the above expression in NetBeans and it works; however it does
not work within "reg exp extractor" post-processor. However this
expression (which, unfortunately also includes 'token=') does work:
token=[^\n^ ]*
Does that mean lookback is not supported? If so, how can I extract value
to the right of 'token=' and pass it on to subsequent requests?
thanks,
-nikita
---------------------------------------------------------------------
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]