Module:Extract text

Revision as of 22:49, 13 December 2020 by Sol (talk | contribs) (Created page with "local ExtractText = {} function ExtractText.from_parentheses(frame) local match_result = frame.args[1]:match'%((.*)%)' if match_result == nil then error'The text did no...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Extract text/doc

local ExtractText = {}

function ExtractText.from_parentheses(frame)
	local match_result = frame.args[1]:match'%((.*)%)'
	
	if match_result == nil then
		error'The text did not contain parentheses.'
	else
		return match_result
	end
end

return ExtractText