Module:String/pattern escape

From The Languages of David J. Peterson
Jump to navigation Jump to search

Documentation for this module may be created at Module:String/pattern escape/documentation

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