Blazemeter functional API Extract from response of type regex for token

book

Article ID: 224771

calendar_today

Updated On:

Products

BlazeMeter

Issue/Introduction

How to retrieve a response (token) into a variable using type regex.

Environment

Release :

Component : BLAZEMETER 

Resolution

To return the token into a variable use the following regular expression:
(.*)

Additional Information

The API functional test results in a jmeter script being executed, see the request.jmx in the artifacts.zip.
According to the Jmeter doc, the regular expression must be enclosed in parenthesis.
In: https://jmeter.apache.org/usermanual/component_reference.html

Look for Regular Expression:

The regular expression used to parse the response data. This must contain at least one set of parentheses "()" to capture a portion of the string, unless using the group $0$. Do not enclose the expression in / / - unless of course you want to match these characters as well.