Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:RegExpr
(view source)
Revision as of 05:59, 1 June 2017
63 bytes added
,
7 years ago
no edit summary
Line 1:
Line 1:
local re = {}
local re = {}
−
function re.
regExpr
(frame)
+
function re.
findMatch
(frame)
-- frame[1] = test string
-- frame[1] = test string
-- frame[2] = Lua pattern
-- frame[2] = Lua pattern
−
return
string.match(frame[1], frame[2])
+
result =
string.match(frame[1], frame[2])
+
if (result == nil) then
+
result = ""
+
end
+
return result
end
end
IbarakiIbuki
5,421
edits