<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fa">
	<id>https://dezfulwiki.ir/index.php?action=history&amp;feed=atom&amp;title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86%3AStringReplace</id>
	<title>پودمان:StringReplace - تاریخچهٔ نسخه‌ها</title>
	<link rel="self" type="application/atom+xml" href="https://dezfulwiki.ir/index.php?action=history&amp;feed=atom&amp;title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86%3AStringReplace"/>
	<link rel="alternate" type="text/html" href="https://dezfulwiki.ir/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:StringReplace&amp;action=history"/>
	<updated>2026-04-11T23:15:08Z</updated>
	<subtitle>تاریخچهٔ نسخه‌ها برای این صفحه در ویکی</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://dezfulwiki.ir/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:StringReplace&amp;diff=897&amp;oldid=prev</id>
		<title>Amin: ۱ نسخه واردشده</title>
		<link rel="alternate" type="text/html" href="https://dezfulwiki.ir/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:StringReplace&amp;diff=897&amp;oldid=prev"/>
		<updated>2021-10-19T02:02:11Z</updated>

		<summary type="html">&lt;p&gt;۱ نسخه واردشده&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fa&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;→ نسخهٔ قدیمی‌تر&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;نسخهٔ ‏۱۹ اکتبر ۲۰۲۱، ساعت ۱۲:۰۲&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;fa&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(بدون تفاوت)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Amin</name></author>
	</entry>
	<entry>
		<id>https://dezfulwiki.ir/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:StringReplace&amp;diff=896&amp;oldid=prev</id>
		<title>dezfulwiki&gt;Dalba: «پودمان:StringReplace» را محافظت کرد: الگوهای حساس: Special:Permalink/26127581#پود:StringReplace ([ویرایش=تنها مدیران] (بی‌پایان) [انتقال=تنها مدیران] (بی‌پایان))</title>
		<link rel="alternate" type="text/html" href="https://dezfulwiki.ir/index.php?title=%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:StringReplace&amp;diff=896&amp;oldid=prev"/>
		<updated>2019-05-17T05:31:53Z</updated>

		<summary type="html">&lt;p&gt;«&lt;a href=&quot;/wiki/%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:StringReplace&quot; title=&quot;پودمان:StringReplace&quot;&gt;پودمان:StringReplace&lt;/a&gt;» را محافظت کرد: &lt;a href=&quot;/index.php?title=%D9%88%D9%BE:%D8%A7%D9%84%DA%AF%D9%88%D9%87%D8%A7%DB%8C_%D8%AD%D8%B3%D8%A7%D8%B3&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;وپ:الگوهای حساس (صفحه وجود ندارد)&quot;&gt;الگوهای حساس&lt;/a&gt;: &lt;a href=&quot;/wiki/%D9%88%DB%8C%DA%98%D9%87:%D9%BE%DB%8C%D9%88%D9%86%D8%AF_%D8%AF%D8%A7%D8%A6%D9%85%DB%8C/26127581#پود:StringReplace&quot; title=&quot;ویژه:پیوند دائمی/26127581&quot;&gt;Special:Permalink/26127581#پود:StringReplace&lt;/a&gt; ([ویرایش=تنها مدیران] (بی‌پایان) [انتقال=تنها مدیران] (بی‌پایان))&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['encode wiki page name'] = function( frame )&lt;br /&gt;
	local x = mw.ustring.gsub( &lt;br /&gt;
		frame.args[1] or '', &lt;br /&gt;
		'[\'&amp;quot;&amp;amp;_]', &lt;br /&gt;
		{ &lt;br /&gt;
			[&amp;quot;'&amp;quot;] = '&amp;amp;#39;', &lt;br /&gt;
			['&amp;quot;'] = '&amp;amp;#34;', &lt;br /&gt;
			['&amp;amp;'] = '&amp;amp;#38;', &lt;br /&gt;
			['_'] = ' ', &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>dezfulwiki&gt;Dalba</name></author>
	</entry>
</feed>