在 OpenResty 中使用正则
admin 7年前 (2017-02-17) 3567浏览 0评论
在 OpenResty 中使用正则表达式,社区中推荐的做法是使用ngx.re api。比如匹配一个字符串是否为 http(s) 的链接,可以这么写: local function is_http_url(s) return ngx.re.find(s...
admin 7年前 (2017-02-17) 3567浏览 0评论
在 OpenResty 中使用正则表达式,社区中推荐的做法是使用ngx.re api。比如匹配一个字符串是否为 http(s) 的链接,可以这么写: local function is_http_url(s) return ngx.re.find(s...