0
votes

I have to get the sid value from response header and use this value in next request. but my regular expression is not picking up the value Response: HTTP/1.1 301 Moved Permanently Cache-Control: no-cache Pragma: no-cache Expires: -1 Location: https://abc.be.com/tsg/de.aspx?sid=s44mNTM3MkRCRUMtRkEfrgtfTEwRDMyQUZFJDI1MDYxMTE5m12s Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000; includeSubDomains Date: Mon, 07 Jun 2021 10:16:04 GMT Content-Length: 0

enter image description here

enter image description here

2
Please post the regexWiszh

2 Answers

0
votes

I have tried my option and found solution my using the following regex:

Location: .+/de.aspx?sid=(.*?)\n

0
votes

Just sid=(.*) should do the trick for you:

enter image description here

Where:

  • () - grouping
  • . - matches any character
  • * - zero or more occurrences

So it will start from sid= and capture everything till the line break

More information: