I have a HTTP Response from JMETER as :


I need to pass the message "2578W" into the next HTTP request. I am using the Regular Expression Extractor in JMETER. and passing the values as: Apply to Main Sample and sub-sample

Field to Check : Body
Reference Name: ${Message}
Regular Expression: [{"Id":null,"Message":"(.*?),","IsError":false}]
Match No. 1
Default Value: Not found

2 Answers 2


You need to escape these symbols [] with backslashes as they are Regular Expressions Meta Characters representing character classes

So I would recommend amending your Regular Expression to look like:


Don't forget to set "Template" to $1$

JMeter Regular Expression

See Using RegEx (Regular Expression Extractor) With JMeter article for more details on performing correlation in JMeter tests using regular expressions.

Given you getting response in JSON format you may find JSON Extractor easier to use, the relevant JSON Path query will be as simple as


Try the folllowing regex:


You can experiment easily on this link. Your original regex matches much much more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.