[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Pattern question
- From: Bernd Eggink <monoped@...>
- Date: Tue, 23 Apr 2013 12:02:31 +0200
Hi experts,
can anybody explain the following:
s = "/one/two/three"
print(s:match("/.-$")) --> /one/two/three
Shouldn't the result be "/three"? To me it seems clear that "three" is
the shortest character sequence between '/' and the end of the string.
This variant works as expected:
print(s:match("/[^/]-$")) --> /three
Regards,
Bernd
--
http://sudrala.de