1.插入api
*/src/luam/src/ngx_http_lua_regex.c
void
ngx_http_lua_inject_regex_api(lua_State *L)
{
/* ngx.re */
lua_createtable(L, 0, 5 /* nrec */); /* .re */
lua_pushcfunction(L, ngx_http_lua_ngx_re_find);
lua_setfield(L, -2, "find");
lua_pushcfunction(L, ngx_http_lua_ngx_re_match);
lua_setfield(L, -2, "match");
lua_pushcfunction(L, ngx_http_lua_ngx_re_gmatch);
lua_setfield(L, -2, "gmatch");
lua_pushcfunction(L, ngx_http_lua_ngx_re_sub);
lua_setfield(L, -2, "sub");
lua_pushcfunction(L, ngx_http_lua_ngx_re_gsub);
lua_setfield(L, -2, "gsub");
lua_setfield(L, -2, "re");
}