Fix #129 (experimental)

This commit is contained in:
hrsh7th
2021-09-01 20:11:02 +09:00
parent a8f62d2364
commit 98124321fe
2 changed files with 47 additions and 19 deletions

View File

@@ -17,5 +17,13 @@ pattern.offset = function(p, text)
return nil, nil
end
pattern.matchstr = function(p, text)
local s, e = pattern.offset(p, text)
if s then
return string.sub(text, s, e)
end
return nil
end
return pattern