[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Glitch noticed in Lpeg
- From: Thomas Harning <harningt@...>
- Date: Thu, 28 Aug 2008 10:23:21 -0400
I just noticed a glitch while trying to test out the 're' module for
Lpeg....
string reverse example
> rev = re.compile[[ R <- (!.) -> '' / ({.} ) -> '%2%1']]
> print(rev:match"0123456789") --> 9876543210
stdin:1: invalid capture index (2)
stack traceback:
[C]: in function 'match'
stdin:1: in main chunk
[C]: ?
looking at it, it looks like the re expression is wrong, rather than
're' having a bug.