Welcome! Log In Create A New Profile

Advanced

Re: [ngx_lua] ngx.re.split implementation

All files from this thread

File Name File Size   Posted by Date  
ngx_re_split.patch 13.3 KB open | download Jader H. Silva 07/13/2012 Read message
Jader H. Silva
July 13, 2012 05:14PM
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@gmail.com>

> Hello!
>
> On Wed, Jul 11, 2012 at 12:54 PM, Jader Henrique da Silva
> <cad_jsilva@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@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - ngx_re_split.patch (13.3 KB)
Subject Author Posted

[ngx_lua] ngx.re.split implementation

Jader Henrique da Silva July 11, 2012 03:56PM

Re: [ngx_lua] ngx.re.split implementation

geberhart July 11, 2012 05:22PM

Re: [ngx_lua] ngx.re.split implementation

geberhart July 11, 2012 05:28PM

Re: [ngx_lua] ngx.re.split implementation

agentzh July 11, 2012 07:42PM

Re: [ngx_lua] ngx.re.split implementation Attachments

Jader H. Silva July 13, 2012 05:14PM

Re: [ngx_lua] ngx.re.split implementation

Jader H. Silva July 13, 2012 05:20PM

Re: [ngx_lua] ngx.re.split implementation

agentzh July 14, 2012 03:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready