Try this with a warning that parsing html with regular expressions is a bad idea:
$regex = [regex]'(?<=VALUE=")[^"]*'
$regex.Match('te2pstoretoken" VALUE="v1.2~04C40A77~23"\><INP').Value
Edit: And this code also works:
if ('te2pstoretoken" VALUE="v1.2~04C40A77~23"\><INP' -match '(?<=VALUE=")[^"]*') {
$matches[0]
}
source
share