[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Possible pattern bug
- From: Michael Savage <mikejsavage@...>
- Date: Sat, 16 Nov 2013 20:59:02 +0000
Hi lua-l,
( "[a] [b] c" ):match( "%[(.-)%] c" )
-> "a] [b"
>From http://www.lua.org/manual/5.1/manual.html#5.4.1 or
http://www.lua.org/manual/5.2/manual.html#6.4.1:
> a single character class followed by '-', which also matches 0 or more
> repetitions of characters in the class. Unlike '*', these repetition
> items will always match the shortest possible sequence;
The shortest possible sequence for the above is "b". Is this a bug?
Mike