[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: Any LPEG tutorial for laymen ?
From:       David Crayford <dcrayford () gmail ! com>
Date:       2013-09-25 15:59:05
Message-ID: 52430849.6040602 () gmail ! com
[Download RAW message or body]

On 25/09/2013 11:00 PM, steve donovan wrote:
> On Wed, Sep 25, 2013 at 4:21 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>> p = "Local Socket:   2001:db8:4545:2:0:9ff:ac11:4519..750"
> Or using SIP:
>
>> res = {}
>> = sip.match('Local Socket: $S{addr}..$i{port}',p,res)
> true
>> = res.port
> 750
>> = res.addr
> 2001:db8:4545:2:0:9ff:ac11:4519
>

That's really cool. I would like to add a null specifier so I can make 
it less verbose.

sip.match('$n : $S{addr}..$i{port}',p,res)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic