Compare variable got from location with set of strings

Hello,

I have some location in configuration like this:
location ~ /([A-z]+_[A-z0-9]+) {
… do something (got $1) …
}

And i need to compare this ‘$1’ with a set of strings. How can i do
this?

Thanks!

On 23 September 2013 11:03, Vil S. [email protected] wrote:

Hello,

I have some location in configuration like this:
location ~ /([A-z]+_[A-z0-9]+) {
… do something (got $1) …
}

And i need to compare this ‘$1’ with a set of strings. How can i do this?

Use a named capture in the location line and the resulting variable
won’t get clobbered like a $1 would.

HTH,
Jonathan