Hello!
On Thu, Jul 11, 2013 at 12:44 AM, joeking36 wrote:
> 现在想匹配个关键字"gameDesc":"1626" 关键字包含",请问改怎么写?
>
可以使用 Lua 语言的“long brackets”语法:
ngx.re.match(subj, [["gameDesc":"1626"]], "jo")
> content_by_lua '
> local req_body = ngx.req.get_body_data()
> local m, err = ngx.re.match(req_body, "(gameDesc)and(1626)")
你这里的正则 "(gameDesc)and(1626)" 中的“and”是啥意思?另外,你为何要在这个正则里面使用圆括号?你到底想匹配什么东西?
Regards,
-agentzh
--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
发言: 请发邮件到 openresty@googlegroups.com
退订: 请发邮件至 openresty+unsubscribe@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html