jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Cysne <>
Subject Re: need help with regular expression(regexp tester)
Date Mon, 28 May 2012 13:46:08 GMT
Where did you add this Regular Expression Extractor?
Try to use it, only, inside the sampler with the desired json response and
not out of it.
JMeter Test Plan is hierarchical and, if you add the Regex Ext just bellow
a Logic Controller, it will repeat the test in every sampler inside the
grouping controller.

I also tested your regex and seams fine to me.
Although, I have some tips on it.
You could use one of the examples bellow (and many more if you want) in
order to reduce the overall load of the dotted regex

\\"Status\\":\\"([A-Z]+?)\\"  --> work only for upper case letters
\\"Status\\":\\"([a-zA-Z]+?)\\"   -> work for complete, COMPLETE or any
other variant with upper and/or lower case letters
\\"Status\\":\\"(\w+?)\\"  --> work with any compound of a-z, A-Z, 0-9 and
_ (underscore) characters

I have striped the commas because this way your Status attribute could be
in any part of your json object structure.

Hope it helps you.
Flávio Cysne

2012/5/28 venkatakurathi <>

> Hi All,
> i am facing an problem with extracting the required string from response.
> the below is the response
> "jobId\":\"32c1919e-a8c3-11e1-9220-00163e7f6087\",\"Status\":\"COMPLETED\",\"Percentage\":100}')"}
> i need to get the status completed(until then the loop runs)
> the regexp i used :
> \\",\\"Status\\":\\"(.+?)\\",\\"
> when i checked it with regexp tester it is showing the output.
> during run time i added debug sampler to check the values we are
> capturing....then is showin my default value "ERROR".
> can some one assist me in why this difference b/w regexp tester and debug
> sampler.
> what could be the proper regular expression to extract the string?
> -----
> Venkat Akurathi
> 91-9703186688
> --
> View this message in context:
> Sent from the JMeter - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message