search

Home  >  Q&A  >  body text

nginx location regular data extraction problem

nginx Help

location ~* \.(gif|jpg|jpeg)$ {
    //这里怎么拿到 括号里的值?
    //比如
    set $ext "gif";//得到括号里面是什么内容
}
漂亮男人漂亮男人2751 days ago625

reply all(1)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-05-16 17:20:15

    Well, ask and answer your own questions

    
    location ~* \.(?<ext_name>gif|jpg|jpeg)$ {
        //这里怎么拿到 括号里的值?
        //比如
        set $ext "$ext_name";//得到括号里面是什么内容
    }

    reply
    0
  • Cancelreply