[ngx_lua] ngx.re.split implementation

Jader H. Silva jaderhs5 at gmail.com
Fri Jul 13 21:13:30 UTC 2012


So, here it is :)

ngx.re.split(*subject, regex, options?*, limit?)

This function is based on ngx_re_sub.

It will split subject on regex matches and return a table of strings. Limit
is the max number of splits (0 will return a table containing the subject
string).

Let me know if there are bugs, identation issues or anything I need to fix.

Jader H. Silva

2012/7/11 agentzh <agentzh at gmail.com>

> Hello!
>
> On Wed, Jul 11, 2012 at 12:54 PM, Jader Henrique da Silva
> <cad_jsilva at uolinc.com> wrote:
> > I was checking HttpLuaModule docs and saw "ngx.re.split" implementation
> in
> > the TODO section.
> >
> > Is it already implemented?
>
> Nope, otherwise I would update the TODO section accordingly :)
>
> > Are there any details about this implementation (e.g. parameters,
> returned
> > data)?
> >
>
> Not yet. But I think the behavior will be similar to Perl 5's split
> builtin function.
>
> I'm always open to patches for this feature :)
>
> Best regards,
> -agentzh
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120713/821dbfbd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ngx_re_split.patch
Type: application/octet-stream
Size: 13574 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120713/821dbfbd/attachment-0001.obj>


More information about the nginx mailing list