[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem matching on [.]
- From: David Kastrup <dak@...>
- Date: Tue, 15 May 2007 01:49:25 +0200
"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