Answer the question
In order to leave comments, you need to log in
How to specify character length in location nginx regular expression?
Why when specifying the length in a regular expression:
location ~ ^/qwerty/[0-9a-f]{2}/([0-9a-f]{32})([0-9]{10})([0-9]+)\.php$ {
...
}
location ~ ^/qwerty/[0-9a-f]+/([0-9a-f]+)([0-9]+)([0-9]+)\.php$ {
...
}
Answer the question
In order to leave comments, you need to log in
The expression must be enclosed in quotation marks. Curly braces are not only used in regular expressions.
location ~ '^/qwerty/[0-9a-f]{2}/([0-9a-f]{32})([0-9]{10})([0-9]+)\.php$' {
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question