1

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\(".*"\)\);

2
  • 1
    Use LoadXMLString\("Response", window\.atob\("([^"]*)"\)\); (demo) and get it via myvar_1_g1. Use $1$ as template Commented Apr 2, 2019 at 6:49
  • @WiktorStribiżew : Thanks, that solved it. Commented Apr 2, 2019 at 7:07

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.