Try using $1$
as a Template, it should resolve your issue.
Looking into your request I can see that you're sending %24%7Bauth_token%7D
which being decoded looks like ${auth_token}
so you use case is not correct.
You need 2 requests:
- GET request to get the page and extract RequestVerificationToken and store it to
auth_token
variable.
- POST Request which will use
auth_token
variable.
See Using Regular Expressions in JMeter guide for more details.
By the way, you can use combination of Debug Sampler and View Results Tree listener to see if there are any matches. It should be more convenient w.r.t. groups and variables.
In general, it isn't recommended to use Regular Expressions to parse HTML. I would suggest to use XPath Extractor instead. Relevant XPath expression will look like:
//input[@name='__RequestVerificationToken']/@value
Few things to notice:
- If you page isn't XHTML compliant you'll need to check
Use Tidy
box in XPath Extractor
- JMeter 2.11 provides nice XPath Tester right in View Results Tree Listener