I have the following string set var="/host=the_host/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "C:\wildfly-15.0.1.Final\bin\vault\vault.keystore"),("KEYSTORE_PASSWORD" => "MASK-18BzezESSkb72WrhEf6Rsu"),("KEYSTORE_ALIAS" => "vault"),("SALT" => "1234abcd"),("ITERATION_COUNT" => "120"),("ENC_FILE_DIR" => "C:\wildfly-15.0.1.Final\bin\vault/")])" I want to extract only the MASK-18BzezESSkb72WrhEf6Rsu value alone using windows batch. I have tried using the for but couldn’t find anything to fetch the password alone. >Solution : @ECHO OFF SETLOCAL SET "string=/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "C:\wildfly-8.2.1.Final\bin\vault\vault.keystore"),("KEYSTORE_PASSWORD"… Read More How to fetch the substring from the input string in command prompt