On 01 Nov 2016, at 16:44, olat <[email protected]> wrote:

> Hello,
> 
> I would like to ask about regex. Why these 2 doesn't behave the same?
> 
> location ~ /(apple/|pear/(small|big)/|test(ing|er)/(fruit|vegis)_)*
> 
> location ~ /apple/*|/pear/(small|big)/*|/test(ing|er)/(fruit|vegis)_*
> 
> 
> could you point me to good practice?

The good practice is not to use regex at all.

location /apple/ {
}

locaiton /pear/ {
}

etc.


-- 
Igor Sysoev
http://nginx.com

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to