lua-users home
lua-l archive

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


"David Burgess" <dburgess@gmail.com> writes:

> What I grapple with is
>
>> print(string.match("x","[f]"))
> nil
>
>>print(string.match("x","[f]*"))
>
> (empty string)

Where is the problem?  _Every_ string contains the empty string as a
substring at _any_ position.  And "[f]*" matches an empty string.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum