<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ta">
	<id>https://wiki2.tamilar.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AStringReplace</id>
	<title>Module:StringReplace - திருத்த வரலாறு</title>
	<link rel="self" type="application/atom+xml" href="https://wiki2.tamilar.wiki/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AStringReplace"/>
	<link rel="alternate" type="text/html" href="https://wiki2.tamilar.wiki/w/index.php?title=Module:StringReplace&amp;action=history"/>
	<updated>2026-06-02T09:40:05Z</updated>
	<subtitle>விக்கியில் இப்பக்கத்துக்கான திருத்த வரலாறு</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki2.tamilar.wiki/w/index.php?title=Module:StringReplace&amp;diff=91226&amp;oldid=prev</id>
		<title>imported&gt;Lingam: &quot;-- Module for different search and replace operations on strings. local p = {}  -- Takes one string parameter, and returns the string with all characters with special meaning for Lua patterns escaped with a preceding `%`. function p.escape_pattern(text)     -- Replaces each occurrence of any of ().%+-*?[^$ with a `%` and then the character.     local r = string.gs...&quot;-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது</title>
		<link rel="alternate" type="text/html" href="https://wiki2.tamilar.wiki/w/index.php?title=Module:StringReplace&amp;diff=91226&amp;oldid=prev"/>
		<updated>2024-02-19T06:46:33Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;-- Module for different search and replace operations on strings. local p = {}  -- Takes one string parameter, and returns the string with all characters with special meaning for Lua patterns escaped with a preceding `%`. function p.escape_pattern(text)     -- Replaces each occurrence of any of ().%+-*?[^$ with a `%` and then the character.     local r = string.gs...&amp;quot;-இப்பெயரில் புதிய பக்கம் உருவாக்கப்பட்டுள்ளது&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ta&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← பழைய திருத்தம்&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;06:46, 19 பெப்பிரவரி 2024 இல் நிலவும் திருத்தம்&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;ta&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(வேறுபாடு ஏதுமில்லை)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key mediawiki:diff:1.41:old-228173:rev-91226 --&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Lingam</name></author>
	</entry>
	<entry>
		<id>https://wiki2.tamilar.wiki/w/index.php?title=Module:StringReplace&amp;diff=228173&amp;oldid=prev</id>
		<title>imported&gt;AntanO: :en:Module:StringReplace இலிருந்து 19 திருத்தங்கள்</title>
		<link rel="alternate" type="text/html" href="https://wiki2.tamilar.wiki/w/index.php?title=Module:StringReplace&amp;diff=228173&amp;oldid=prev"/>
		<updated>2016-02-28T11:59:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Module:StringReplace&quot; class=&quot;extiw&quot; title=&quot;en:Module:StringReplace&quot;&gt;en:Module:StringReplace&lt;/a&gt; இலிருந்து 19 திருத்தங்கள்&lt;/p&gt;
&lt;p&gt;&lt;b&gt;புதிய பக்கம்&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module for different search and replace operations on strings.&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Takes one string parameter, and returns the string with all characters with special meaning for Lua patterns escaped with a preceding `%`.&lt;br /&gt;
function p.escape_pattern(text)&lt;br /&gt;
    -- Replaces each occurrence of any of ().%+-*?[^$ with a `%` and then the character.&lt;br /&gt;
    local r = string.gsub(text, &amp;quot;[%(%)%.%%%+%-%*%?%[%^%$]&amp;quot;, &amp;quot;%%%1&amp;quot;)&lt;br /&gt;
    return r&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns the first parameter, with all occurrences of the second parameter replaced with the third parameter.&lt;br /&gt;
-- All special characters are ignored: {{#invoke:StringReplace|replace_all|test.a%1$foo|%1|bar}} results in `test.abarfoo`.&lt;br /&gt;
function p.replace_all(frame)&lt;br /&gt;
    local str = frame.args[1]&lt;br /&gt;
    local strToFind = frame.args[2]&lt;br /&gt;
    local strToreplaceWith = frame.args[3]&lt;br /&gt;
    local r = string.gsub(str, p.escape_pattern(strToFind), p.escape_pattern(strToreplaceWith))&lt;br /&gt;
    return r&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p[&amp;#039;encode wiki page name&amp;#039;] = function( frame )&lt;br /&gt;
	local x = mw.ustring.gsub( &lt;br /&gt;
		frame.args[1] or &amp;#039;&amp;#039;, &lt;br /&gt;
		&amp;#039;[\&amp;#039;&amp;quot;&amp;amp;_]&amp;#039;, &lt;br /&gt;
		{ &lt;br /&gt;
			[&amp;quot;&amp;#039;&amp;quot;] = &amp;#039;&amp;amp;#39;&amp;#039;, &lt;br /&gt;
			[&amp;#039;&amp;quot;&amp;#039;] = &amp;#039;&amp;amp;#34;&amp;#039;, &lt;br /&gt;
			[&amp;#039;&amp;amp;&amp;#039;] = &amp;#039;&amp;amp;#38;&amp;#039;, &lt;br /&gt;
			[&amp;#039;_&amp;#039;] = &amp;#039; &amp;#039;, &lt;br /&gt;
		} &lt;br /&gt;
	)&lt;br /&gt;
	return mw.text.trim( x )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;AntanO</name></author>
	</entry>
</feed>