There is a regular season:
/\/tickets\/(.*)\/(.*)\//i Which I use to recognize lines like this /tickets/moscow/saint-petersburg/ , but the problem is that the regular schedule can capture the line /tickets/moscow/tokyo/simferopol/ and so on. I solved this problem with the help of another regular program:
path.match(/\//g).length == 4 What regular in nginx do I need to use and how to correctly write it in order to catch only the correct 4-slash strings in nginx? Thank.