regex issue sending BAN request to Varnish server via curl regex issue sending BAN request to Varnish server via curl curl curl

regex issue sending BAN request to Varnish server via curl


The regex seems fine.
I think you should try to escape the slashes after the first parenthesis. I assume Varnish is interpreting the expression between parenthesis as a regex (which is fine) and in a regex slashes are delimiters (some kind of special characters).
This might work:

curl -X BAN "https://oursite.com/product/(search\/home$|item\/(391|1232))"