Forfiles and escape char
Posted: 16 Sep 2020 04:16
Hello,
this string works fine in dos shell
but If I try this:
I got this error
.+?(? was unexpected at this time.
any idea? Thanks
this string works fine in dos shell
Code: Select all
curl --request POST "https://somesite/access_token" --user user:pass | grep -o -P -e "(?<=\"access_token\":\").+?(?=\")"
Code: Select all
for /f %%a in ('curl --request POST "https://somesite/access_token" --user user:pass ^| grep -o -P -e "(?<=\"access_token\":\").+?(?=\")"') do set "TOKEN=%%a"
.+?(? was unexpected at this time.
any idea? Thanks