March 15th, 2013, 04:21 PM
Regular Expression to extract csrf_token in JMETER
I am trying to extract the value of csrf_token in JMETER regular expression extractor from the following response content
That is the value, 3798ef0c-d2d8-4ce2-8609-4a2a2e27eed3
but this returns the csrf along with it, and I just need the value.
Thanks for any help!
March 15th, 2013, 04:58 PM
Sounds like you are getting backtrace 0 (which is always the entire match instead of what you want, backtrace 1.
How you specify that varies from language to language.
February 6th, 2014, 09:18 AM
It looks like that your regular expression is correct. I'd suggest to use $1$ as a "Template" in your Regular Expression Extractor Post Processor as it matches following:
group 0 =csrf_token=3798ef0c-d2d8-4ce2-8609-4a2a2e27eed3
group 1 =3798ef0c-d2d8-4ce2-8609-4a2a2e27eed3
And you're interested in group 1.
March 6th, 2014, 03:37 AM
my point exactly, but glinius said it better! kudos!