[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem matching on [.]
- From: "Mark Edgar" <medgar123@...>
- Date: Mon, 14 May 2007 17:00:32 -0700
This behavior is as expected.
print(string.match("x", "[f]+"))
nil
print(string.match("x", "f"))
nil
print(string.match("x", "f+"))
nil
print(string.match("b", "ab"))
nil
print(string.match("b", "a+b"))
nil
print(string.match("b", "a*b"))
b
Using * where + is meant is a common error in Lua patterns and in regex-land.
-Mark