<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12291&amp;type=atom" />
	<updated>2017-01-11T12:31:06Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12291</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110815#p110815" />
			<content type="html"><![CDATA[<p>Понял, благодарю!<br />Вот уж, а я читая справку и тыкал `a сюда а не в опции:<br /><a href="mailto:RegExReplace(buffer, &quot;mi)//.+?<strong>`a</strong>&quot;, &quot;&quot;)">RegExReplace(buffer, &quot;mi)//.+?<strong>`a</strong>&quot;, &quot;&quot;)</a></p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2017-01-11T12:31:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110815#p110815</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110814#p110814" />
			<content type="html"><![CDATA[<p>Это новая строка любого вида, из одного или двух символов. По умолчанию новой строкой считается комбинация `r`n, к ней привязывается символ $. Но секция продолжения (buffer в вашем примере) по умолчанию соединяет строки через `n. Поэтому концы строк у вас не находятся. Это решается опцией `a. При ней концом строки считается один или два символа.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2017-01-11T12:20:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110814#p110814</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110811#p110811" />
			<content type="html"><![CDATA[<p>Благодарю всех! Три рабочих примера, отлично <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Хоть не понимаю почему не работает конструкция:<br /></p><div class="codebox"><pre><code>RegExReplace(buffer, &quot;mi)//.+?$&quot;, &quot;&quot;)</code></pre></div><p>И что такое <strong>R</strong> в ваших примерах.</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2017-01-11T11:35:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110811#p110811</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110700#p110700" />
			<content type="html"><![CDATA[<p>А у меня даже так:<br /></p><div class="codebox"><pre><code>buffer = 
(
string1
// comment string
// comment string
string2 // comment string
// comment string
string3
)

buffer := RegExReplace(buffer, &quot;m`a)\R?//.*&quot;)
MsgBox %buffer%</code></pre></div><p> <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2017-01-08T17:11:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110700#p110700</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110699#p110699" />
			<content type="html"><![CDATA[<p>А у меня так:<br /></p><div class="codebox"><pre><code>
buffer = 
(
string1
// comment string
// comment string
string2 // comment string
// comment string
string3
)

buffer := RegExReplace(buffer, &quot;m`a)\R?//.+$&quot;, &quot;&quot;)
MsgBox %buffer%
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2017-01-08T16:12:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110699#p110699</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110695#p110695" />
			<content type="html"><![CDATA[<p>У меня так работает:<br /></p><div class="codebox"><pre><code>buffer = 
(
string1
// comment string
// comment string
string2 // comment string
// comment string
string3
)

Loop, Parse, buffer, `n
{
var := RegExReplace(A_LoopField, &quot;mi)\/\/(.*)$&quot;, &quot;&quot;)
; If var ;Раскомментировать, если не нужны голые переносы строки
OutputVar .= var . &quot;`n&quot;
}
MsgBox, Результат:`r`n%OutputVar%
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-01-08T14:54:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110695#p110695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110693#p110693" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alekksss пишет:</cite><blockquote><p>buffer := RegExReplace(buffer, &quot;mi)\/\/(.*)$&quot;, &quot;&quot;)</p></blockquote></div><p>Не знаю, у меня этот код возвращает пустоту..<br />А у вас работает этот код?</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2017-01-08T14:17:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110693#p110693</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110691#p110691" />
			<content type="html"><![CDATA[<p>Hi! В теории так:<br /></p><div class="codebox"><pre><code>buffer := RegExReplace(buffer, &quot;mi)\/\/(.*)$&quot;, &quot;&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alekksss]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33684</uri>
			</author>
			<updated>2017-01-08T12:46:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110691#p110691</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Удаление закомментированных строк с помощью регулярных выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=110690#p110690" />
			<content type="html"><![CDATA[<p>Как с помощью AHK удалить закомментированные строки вида // comment string?<br /></p><div class="codebox"><pre><code>buffer = 
(
string1
// comment string
// comment string
string2 // comment string
// comment string
string3
)

buffer := RegExReplace(buffer, &quot;mi)//.+?$&quot;, &quot;&quot;) ; Почему то не работает
MsgBox %buffer%</code></pre></div><p>На выходе должно быть:<br /></p><div class="codebox"><pre><code>string1
string2
string3</code></pre></div>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2017-01-08T12:04:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=110690#p110690</id>
		</entry>
</feed>
