Welcome! Log In Create A New Profile

Advanced

Re: Variable interpolation in a regex.

Harish Sundararaj
September 04, 2012 04:48PM
Hi Valentin,
Thanks. Is there any way to achieve the same thing through some other
means, even if it takes a hit on the performance ?

Thanks
Harish

On Wed, Sep 5, 2012 at 1:33 AM, Valentin V. Bartenev <ne@vbart.ru> wrote:
> On Tuesday 04 September 2012 23:55:07 Harish Sundararaj wrote:
>> Hello All,
>>
>> I have a map block:
>>
>> map $http_cookie $myVal {
>> "~adq_cnv(\d+)=($cmpid[^;]+#(?P<DC>\w{2}))(?:;|$)" $DC;
>> default "XYZ";
>> }
>>
> [...]
>>
>> But that is not working. I tried different variations like : ${cmpid},
>> \$cmpid . But to no luck.
>>
>> Any help would be appreciated.
>
> Regular expressions in config file are compiled at the configuration phase, so
> you can't use variables there.
>
> wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Variable interpolation in a regex.

Harish Sundararaj September 04, 2012 03:56PM

Re: Variable interpolation in a regex.

VBart September 04, 2012 04:04PM

Re: Variable interpolation in a regex.

Harish Sundararaj September 04, 2012 04:48PM

Re: Variable interpolation in a regex.

xav April 10, 2020 05:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready