문제

Can somebody tell me what is the difference between "^string" and "string" in varnish when we evaluate with ~ in varnish

both does not evaluate similarly and one more when we add a \ it is again different

eg

~ "^index.php/sting" is different to ~ "^/string"

am totally confused

Can somebody show me a link to a cheat sheet or something

도움이 되었습니까?

해결책

In terms of regex, ^ means the beginning of the string, meaning

^/string will match /string123 but not /application/string

/string will match both /string123 and /application/string

^string will not match /string but will match string/123 or string123

string will match all /string, string, 123string and any thing that contains the word string

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top