lua-users home
lua-l archive

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


> It is mentioned  in the manual:
> "a single character class followed by '*', which matches 0 or more    
> repetitions of characters in the class.
>  These repetition items will always match the longest possible        
> sequence;"                                                            

It does. The first match gets "abc", the longest sequence there. The
second match gets "", the longest sequence at that point.

In fact, if there is a bug, it is the reverse of what you mentioned.  A
correct answer should be an infinite sequence of "@", because there are
infinite empty strings at the end of "abc".

-- Roberto