lua-users home
lua-l archive

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

On 29/04/2013 17:17, Scott Morgan wrote:
> Even odder....
> Lua 5.2.2  Copyright (C) 1994-2013, PUC-Rio
>  > =(";a;"):gsub("a-", "ITEM")
> Why is that 'a' still there?
I don't think this one is a bug.  "a-" prefers to match the empty string
if possible, and that is all it does here (i.e. matches the 5 distinct
empty substrings of ";a;".)