I'm trying to escape some characters in a string. The string is constantly changing, for example Set-Cookie: SESSION=60a8245bc1976b40d0d8c4ff6f9784fc; path=/
I want to remove Set-Cookie: SESSION= and ; path=/ to leave 60a8245bc1976b40d0d8c4ff6f9784fc.
But since it has "complex" characters, like : = / returns an error when i try
SET cookies2=%cookies:Set-Cookie: SESSION=%
SET cookies3=%cookies2:; path=/=%
echo %cookies3%