lua-users home
lua-l archive

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


On 15/05/2007 01:37, David Burgess wrote:
What I grapple with is

print(string.match("x","[f]"))
nil

print(string.match("x","[f]*"))

(empty string)

I don't understand the problem here. First expression just doesn't match, the second matches because * always matches empty string.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --