help with regex in nginx map

libresco_27 nginx-forum at
Thu Sep 15 17:30:24 UTC 2022

Hello there,

I'm trying to write a simple regex for a map where only the first part of a
string should match. I went through the documentation, which unfortunately
didn't have much examples. 

Heres what I'm trying to achieve -

map $string $redirct_string{
     "~^abc*$" 1;

I also tried to change the regex to a simple "abc*", but it didn't work.
Please let me know where am I going wrong.

Thank you for your answer.

Posted at Nginx Forum:,295213,295213#msg-295213

More information about the nginx mailing list