aboutsummaryrefslogtreecommitdiff
path: root/examples/listIdRe2.lua
diff options
context:
space:
mode:
authorSergio Queiroz <sqmedeiros@gmail.com>2016-06-13 11:56:47 -0300
committerSergio Queiroz <sqmedeiros@gmail.com>2016-06-13 11:56:47 -0300
commit43ce0cb6027033a9a08075d72a77630720895834 (patch)
tree181d3e2ac0c054802f5de35d82f8dd3beeadfe8f /examples/listIdRe2.lua
parentd6b07c6c87655aa114af6aae8b6fef241f99aca3 (diff)
downloadlpeglabel-43ce0cb6027033a9a08075d72a77630720895834.tar.gz
lpeglabel-43ce0cb6027033a9a08075d72a77630720895834.tar.bz2
lpeglabel-43ce0cb6027033a9a08075d72a77630720895834.zip
Updating examples and documentation to match the new API
Diffstat (limited to 'examples/listIdRe2.lua')
-rw-r--r--examples/listIdRe2.lua6
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 @@
1local re = require 're' 1local re = require 'relabel'
2 2
3local errUndef, errId, errComma = 0, 1, 2 3local errUndef, errId, errComma = 0, 1, 2
4 4
@@ -21,9 +21,9 @@ local g = re.compile[[
21]] 21]]
22 22
23function mymatch (g, s) 23function 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
29end 29end