Module:string/pattern escape: Difference between revisions

From Linguifex
Jump to navigation Jump to search
(Created page with "return function (str) return mw.ustring.gsub(str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1") end")
 
m (Sware moved page Module:script/pattern escape to Module:string/pattern escape without leaving a redirect)
 

Latest revision as of 19:25, 30 November 2022

Documentation for this module may be created at Module:string/pattern escape/doc

return function (str)
	return mw.ustring.gsub(str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
end