<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: RegExReplace шаблон замены \\ на \]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12046&amp;type=atom" />
	<updated>2016-09-29T10:07:43Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12046</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108102#p108102" />
			<content type="html"><![CDATA[<p><strong>Alectric</strong><br />В новом топике - пожалуйста.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-09-29T10:07:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108102#p108102</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108101#p108101" />
			<content type="html"><![CDATA[<p>Есть готовое решение, вечером выложу если не забуду.</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-09-29T05:47:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108101#p108101</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108096#p108096" />
			<content type="html"><![CDATA[<p><strong>freeZer0K</strong><br />В таком случае создайте соответствующий задаче топик и приведите имеющийся код. Можно позаимствовать <a href="https://autohotkey.com/board/topic/18769-converting-reg-into-ahk/">отсюда</a>.<br />А также <a href="http://forum.script-coding.com/viewtopic.php?id=6148">точки расставляйте в конце <span class="bbu">всех</span> предложений</a>.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-09-28T19:22:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108096#p108096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108095#p108095" />
			<content type="html"><![CDATA[<p><strong>Flasher</strong>, благодарю за ответ!</p><p>Собственно, я хотел написать конвертер файлов реестра в *.ahk<br />Ничего не нашел, кроме этого:</p><p><a href="http://www.sordum.org/8478/reg-converter-v1-0">http://www.sordum.org/8478/reg-converter-v1-0</a></p><p>Но он только для bat, vbs и au3.</p><p>Есть еще старый код, не помню, где нашел. Но он только из &quot;живого&quot; реестра берет и по-одной ветке - муторно и долго.<br />Может где-то что-то есть еще? Чтобы именно файлы реестра переводил.<br />Надоело &quot;партянки&quot; переделывать в *.ahk</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2016-09-28T19:11:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108095#p108095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108094#p108094" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>freeZer0K пишет:</cite><blockquote><p>кроме прочих, имеется такая сторока:</p></blockquote></div><p>В эти &quot;кроме прочих&quot; всё и упрётся, ибо одними подвыражениями сыт не будешь:<br /></p><div class="codebox"><pre><code>Text = &quot;InstallDir&quot;=&quot;C:\\Program Files\\AutoHotkey&quot;
MsgBox % RegExReplace(Text, &quot;&quot;&quot;(\w+)&quot;&quot;=&quot;&quot;(\w:)\\\\([ \w]+)\\\\([ \w]+)&quot;&quot;&quot;, &quot;$1, $2\$3\$4&quot;)</code></pre></div><p>Поэтому без многопроходности тут по нормальному никак:<br /></p><div class="codebox"><pre><code>Text = &quot;InstallDir&quot;=&quot;C:\\Program Files\\AutoHotkey&quot;
for k, v in {&quot;\\&quot;:&quot;\&quot;, &quot;&quot;&quot;&quot;:&quot;&quot;, &quot;=&quot;:&quot;, &quot;}
    Text := StrReplace(Text, k, v, &quot;All&quot;)
MsgBox % Text</code></pre></div><p>Более короткий вариант:<br /></p><div class="codebox"><pre><code>Text = &quot;InstallDir&quot;=&quot;C:\\Program Files\\AutoHotkey&quot;
MsgBox % StrReplace(RegExReplace(Text, &quot;(&quot;&quot;|\\(?=\\))&quot;), &quot;=&quot;, &quot;, &quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-09-28T18:36:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108094#p108094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108091#p108091" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong>, исправил.</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2016-09-28T17:37:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108091#p108091</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108090#p108090" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>freeZer0K</strong>, оформите код соответствующим тегом.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2016-09-28T17:00:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108090#p108090</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: RegExReplace шаблон замены \\ на \]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=108070#p108070" />
			<content type="html"><![CDATA[<p>Добрый вечер!<br />Нигде не могу найти инфу и ничего не получается - мозг плавится!<br />Короче, кроме прочих, имеется такая сторока:</p><div class="codebox"><pre><code>&quot;InstallDir&quot;=&quot;C:\\Program Files\\AutoHotkey&quot;</code></pre></div><p>Сделал шабон:</p><div class="codebox"><pre><code>RegKey := RegExReplace(RegKey, &quot;&quot;&quot;(.*)&quot;&quot;=&quot;&quot;(.*)&quot;&quot;&quot;, &quot;$1, $2&quot;)</code></pre></div><p>который преобразовывает строку в такую:</p><div class="codebox"><pre><code>InstallDir, C:\\Program Files\\AutoHotkey</code></pre></div><p>а надо получить такую (с одним backslash):</p><div class="codebox"><pre><code>InstallDir, C:\Program Files\AutoHotkey</code></pre></div><p>Это удалось сделать только за два прохода таким образом:</p><div class="codebox"><pre><code>RegKey := RegExReplace(RegKey, &quot;&quot;&quot;(.*)&quot;&quot;=&quot;&quot;(.*)&quot;&quot;&quot;, &quot;$1, $2&quot;)
RegKey := StrReplace(RegKey, &quot;\\&quot;, &quot;\&quot;, &quot;All&quot;)
MsgBox % RegKey</code></pre></div><p>Хотелось бы сделать все за один проход RegExReplace при условии, что другие строки, не содержащие \\ будут изменены по первому шаблону ...</p><p>Пожалуйта ...</p>]]></content>
			<author>
				<name><![CDATA[freeZer0K]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34228</uri>
			</author>
			<updated>2016-09-28T14:57:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=108070#p108070</id>
		</entry>
</feed>
