lua-users home
lua-l archive

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


On Tue, Dec 14, 2010 at 07:32:40PM +0200, Peter Cawley wrote:
> On Tue, Dec 14, 2010 at 5:31 PM, Dirk Laurie <dpl@sun.ac.za> wrote:
> > I don't understand this.
> >> s='abbcd'; return a:match('b*')
> >
> >>
> > I expected the last match to be also "bb".
> 
> The first position which "b*" can match at is the start of the string,
> where it matches "". There is a longer match later in the string, but
> the first match is "".
> 
Ouch.  Sorry about that.  A clear sign that I should sign off for today.

Dirk