lua-users home
lua-l archive

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


Dirk Laurie <dirk.laurie <at> gmail.com> writes:

> 
> Nothing in the description of `gsub` prepares the user for this:
> 
> > print((string.gsub(";a;", "a*", "ITEM")))
> ITEM;ITEMITEM;ITEM
> 
Pattern "a*" match empty string after each char and at the begin of string
Think about this : 
print((string.gsub(";a;", "", "ITEM")))
May be you want : string.gsub(";a;", "a+", "ITEM") ?