<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://test6.st34an.tech/index.php?action=history&amp;feed=atom&amp;title=Module%3APattern_utilities</id>
	<title>Module:Pattern utilities - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://test6.st34an.tech/index.php?action=history&amp;feed=atom&amp;title=Module%3APattern_utilities"/>
	<link rel="alternate" type="text/html" href="https://test6.st34an.tech/index.php?title=Module:Pattern_utilities&amp;action=history"/>
	<updated>2026-04-22T16:50:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://test6.st34an.tech/index.php?title=Module:Pattern_utilities&amp;diff=487&amp;oldid=prev</id>
		<title>imported&gt;Djpwikiadmin: Created page with &quot;local export = {}  -- A helper function to escape magic characters in a string when interpolating a string into a Lua pattern. -- Magic characters: ^$()%.[]*+-? function expor...&quot;</title>
		<link rel="alternate" type="text/html" href="https://test6.st34an.tech/index.php?title=Module:Pattern_utilities&amp;diff=487&amp;oldid=prev"/>
		<updated>2023-09-03T21:09:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local export = {}  -- A helper function to escape magic characters in a string when interpolating a string into a Lua pattern. -- Magic characters: ^$()%.[]*+-? function expor...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local export = {}&lt;br /&gt;
&lt;br /&gt;
-- A helper function to escape magic characters in a string when interpolating a string into a Lua pattern.&lt;br /&gt;
-- Magic characters: ^$()%.[]*+-?&lt;br /&gt;
function export.pattern_escape(text)&lt;br /&gt;
	if type(text) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		text = text.args[1]&lt;br /&gt;
	end&lt;br /&gt;
	text = mw.ustring.gsub(text, &amp;quot;([%^$()%%.%[%]*+%-?])&amp;quot;, &amp;quot;%%%1&amp;quot;)&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- A helper function to escape magic characters in a string when interpolating a string into a Lua pattern replacement&lt;br /&gt;
-- string (the right side of a gsub() pattern substitution call).&lt;br /&gt;
-- Magic characters: %&lt;br /&gt;
function export.replacement_escape(text)&lt;br /&gt;
	if type(text) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		text = text.args[1]&lt;br /&gt;
	end&lt;br /&gt;
	text = mw.ustring.gsub(text, &amp;quot;%%&amp;quot;, &amp;quot;%%%%&amp;quot;)&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>imported&gt;Djpwikiadmin</name></author>
	</entry>
</feed>