plaidshirt
plaidshirt

Reputation: 5681

Get values with regex in JMeter Regular Expression Extractor

I try to get value between quote signs in JMeter, but I get back whole string in myvar_1_g0 named variable instead of the value. Tester: https://regex101.com/r/aId5jo/2

Sample text: LoadXMLString("Response", window.atob("SGVsbG8="));

Regex: LoadXMLString\("Response", window\.atob\(".*"\)\);

Upvotes: 1

Views: 122

Answers (1)

Wiktor Stribiżew
Wiktor Stribiżew

Reputation: 627341

You may use a capturing group like this:

LoadXMLString\("Response", window\.atob\("([^"]*)"\)\);
                                          ^^^^^^^  

See the regex demo.

To get the captured value, use myvar_1_g1 and the $1$ value as template.

Upvotes: 1

Related Questions