diff options
Diffstat (limited to 'examples/listIdRe2.lua')
-rw-r--r-- | examples/listIdRe2.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/listIdRe2.lua b/examples/listIdRe2.lua index 67c42f1..4cd140b 100644 --- a/examples/listIdRe2.lua +++ b/examples/listIdRe2.lua | |||
@@ -1,4 +1,4 @@ | |||
1 | local re = require 're' | 1 | local re = require 'relabel' |
2 | 2 | ||
3 | local errUndef, errId, errComma = 0, 1, 2 | 3 | local errUndef, errId, errComma = 0, 1, 2 |
4 | 4 | ||
@@ -21,9 +21,9 @@ local g = re.compile[[ | |||
21 | ]] | 21 | ]] |
22 | 22 | ||
23 | function mymatch (g, s) | 23 | function mymatch (g, s) |
24 | local r, e = g:match(s) | 24 | local r, e, sfail = g:match(s) |
25 | if not r then | 25 | if not r then |
26 | return r, terror[e] | 26 | return r, terror[e] .. " before '" .. sfail .. "'" |
27 | end | 27 | end |
28 | return r | 28 | return r |
29 | end | 29 | end |