Module:string/pattern escape

From Linguifex
< Module:string
Revision as of 19:25, 30 November 2022 by Sware (talk | contribs) (Sware moved page Module:script/pattern escape to Module:string/pattern escape without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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