Regular expressions in server_name: pattern length

Phillip Oldham phill at
Wed Dec 9 12:21:24 MSK 2009

Is it possible to capture the length of a particular pattern in the 
server_name section?

For example, I'm having trouble getting the following to match:

server_name ~([a-z]{2,3})?\d{3,6}\.mysite\.org;

I'm using 0.7.62.

More information about the nginx mailing list