lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> if I have the pattern "(.)(.?)(.?)" and I try to match "ab" where's the b gonna go?

"b" should go with the second capture as it's still greedy (the
question mark makes it optional, but if there is something to capture,
it will be captured).

Paul.

On Wed, Dec 24, 2014 at 1:49 PM, Soni L. <fakedme@gmail.com> wrote:
> <SoniEx2> if I have the pattern "(.)(.?)(.?)" and I try to match "ab"
> <SoniEx2> where's the b gonna go?
> <SoniEx2> (or is that undefined?)
>
> --
> Disclaimer: these emails are public and can be accessed from <TODO: get a
> non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.