I am having a hard time get the "Regex Expression Extractor" working in Jmeter for the following:
Response Header is something like:
Set-Cookie: Token=dfrtydgsdttetert; Domain=.domain.ca; Path=/;
Expires=Fri, 19 Oct 2018 18:54:18 GMT; Secure
ETag: W/"41c-gdf+/mzdw"
In JMeter Regular Expression Extractor:
Apply to: main sample and sub-samples
Field to check "Response Header"
Name of create Variable: extracted_token
Regular Expression: (?<=Token=)(.*)(?=; Domain) <- the goal is
the get the string "dfrtydgsdttetert"
Template: $1$
Match No: 1
Default Value: ERROR
I tried the above configuration and the extracted_token variable is always "ERROR"
if I change the regex to Token= then I get:
extracted_id_token=null
extracted_id_token_g=0
extracted_id_token_g0=Token=
Please guide me how to fix my configuration so I can retrieve "dfrtydgsdttetert" in the response header.


Token=(.*?); Domain, orToken=([^;]+);\s*Domain- Wiktor Stribiżew