<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: RegExMatch]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9832&amp;type=atom" />
	<updated>2015-01-07T19:16:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9832</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90147#p90147" />
			<content type="html"><![CDATA[<p>Вот теперь всё отлично находит, спасибо.</p>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2015-01-07T19:16:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90147#p90147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90146#p90146" />
			<content type="html"><![CDATA[<p>А так?<br /></p><div class="codebox"><pre><code>code = 
(
&lt;td class=&quot;threadNametd&quot;&gt;&lt;a class=&quot;threadL&quot; href=&quot;http://link.com&quot;&gt;Name Password&lt;/a&gt; &lt;span class=&quot;post&quot;&gt;[ &lt;a class=&quot;postPSwithcesLink&quot; 

href=&quot;http://link2.com&quot;&gt;1&lt;/a&gt;  &lt;a class=&quot;postPSwithc&quot; href=&quot;http://link3.com&quot;&gt;2&lt;/a&gt; ]&lt;/span&gt; &lt;/td&gt;
потом идёт какой-то текст
ыфвыввыв
ывф
ыввывввв
и снова
&lt;td class=&quot;threadNametd&quot;&gt;&lt;a class=&quot;threadLerr&quot; href=&quot;http://linked1.com&quot;&gt;Name Password&lt;/a&gt; &lt;span class=&quot;post&quot;&gt;[ &lt;a class=&quot;postPSwithcesLink&quot; href=&quot;http://linked2.com&quot;&gt;1&lt;/a&gt;  &lt;a class=&quot;postPSwithc&quot; href=&quot;http://linked3.com&quot;&gt;2&lt;/a&gt; ]&lt;/span&gt; &lt;/td&gt;
но уже ссылки там другие будут
)

Pos = 1
While Pos := RegExMatch(code, &quot;&lt;td class=&quot;&quot;threadNametd&quot;&quot;&gt;(.*?)&lt;/td&gt;&quot;, block, pos+StrLen(block))
   match .= block1 &quot;`n&quot;
MsgBox, % match</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-01-07T19:11:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90146#p90146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90145#p90145" />
			<content type="html"><![CDATA[<p>В моём файле(исходный код страницы) всё-равно находит просто одну первую часть этим примером.</p>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2015-01-07T18:57:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90145#p90145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90143#p90143" />
			<content type="html"><![CDATA[<p>Может так:<br /></p><div class="codebox"><pre><code>code =
(
&lt;td class=&quot;threadNametd&quot;&gt;&lt;a class=&quot;threadL&quot; href=&quot;http://link.com&quot;&gt;Name Password&lt;/a&gt; &lt;span class=&quot;post&quot;&gt;[ &lt;a class=&quot;postPSwithcesLink&quot; href=&quot;http://link2.com&quot;&gt;1&lt;/a&gt;  &lt;a class=&quot;postPSwithc&quot; href=&quot;http://link3.com&quot;&gt;2&lt;/a&gt; ]&lt;/span&gt; &lt;/td&gt;
потом идёт какой-то текст
ыфвыввыв
ывф
ыввывввв
и снова
&lt;td class=&quot;threadNametd&quot;&gt;&lt;a class=&quot;threadLerr&quot; href=&quot;http://linked1.com&quot;&gt;Name Password&lt;/a&gt; &lt;span class=&quot;post&quot;&gt;[ &lt;a class=&quot;postPSwithcesLink&quot; href=&quot;http://linked2.com&quot;&gt;1&lt;/a&gt;  &lt;a class=&quot;postPSwithc&quot; href=&quot;http://linked3.com&quot;&gt;2&lt;/a&gt; ]&lt;/span&gt; &lt;/td&gt;
но уже ссылки там другие будут
)
loop,parse,code,`n
{
  RegExMatch(a_loopfield, &quot;&lt;td class=&quot;&quot;threadNametd&quot;&quot;&gt;(.*?)&lt;/td&gt;&quot;, block)
  if block!=
    b.=a_index &quot;: &quot; block &quot;`n&quot;
}

MsgBox, % b

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-01-07T18:37:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90143#p90143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=90141#p90141" />
			<content type="html"><![CDATA[<p>Появилась небольшая проблемка, нужно как-то найти в тексте несколько похожих частей и сохранить в переменную:<br /></p><div class="codebox"><pre><code>code = 
(
&lt;td class=&quot;threadNametd&quot;&gt;&lt;a class=&quot;threadL&quot; href=&quot;http://link.com&quot;&gt;Name Password&lt;/a&gt; &lt;span class=&quot;post&quot;&gt;[ &lt;a class=&quot;postPSwithcesLink&quot; href=&quot;http://link2.com&quot;&gt;1&lt;/a&gt;  &lt;a class=&quot;postPSwithc&quot; href=&quot;http://link3.com&quot;&gt;2&lt;/a&gt; ]&lt;/span&gt; &lt;/td&gt;
потом идёт какой-то текст
ыфвыввыв
ывф
ыввывввв
и снова
&lt;td class=&quot;threadNametd&quot;&gt;&lt;a class=&quot;threadLerr&quot; href=&quot;http://linked1.com&quot;&gt;Name Password&lt;/a&gt; &lt;span class=&quot;post&quot;&gt;[ &lt;a class=&quot;postPSwithcesLink&quot; href=&quot;http://linked2.com&quot;&gt;1&lt;/a&gt;  &lt;a class=&quot;postPSwithc&quot; href=&quot;http://linked3.com&quot;&gt;2&lt;/a&gt; ]&lt;/span&gt; &lt;/td&gt;
но уже ссылки там другие будут
)
RegExMatch(code, &quot;&lt;td class=&quot;&quot;threadNametd&quot;&quot;&gt;(.*?)&lt;/td&gt;&quot;, block)
MsgBox, % block</code></pre></div><p>У меня выдаёт лишь первую часть, а мне нужно найти всё такие части и внести их в переменную в столбик.</p>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2015-01-07T18:29:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=90141#p90141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85631#p85631" />
			<content type="html"><![CDATA[<p>Столкнулся с проблемой: если в строке поиска присутствует несколько переменных и в одной из переменной содержится метасимвол, то поиск заканчивается неудачей.<br />Есть ли какое-нибудь решение кроме предварительной &quot;очистки&quot; переменной?</p><div class="codebox"><pre><code>Class=gsehd:gdsdag3223
process=wewe.exe

Title=Просто текст.
gosub,a
Title=(Текст в скобках.)
gosub,a
return

a:
a:=b:=Title . &quot;|&quot; . Class . &quot;|&quot; . process . &quot;`n&quot;
a.=&quot;Следующая строка подобная`n&quot;
msgbox,До`n%a%

a:=RegExReplace(a, Title . &quot;\|&quot; . Class . &quot;\|&quot; . process . &quot;`n&quot; ,&quot;&quot;)
msgbox,1После`n%a%
a:=RegExReplace(a, b ,&quot;&quot;)
msgbox,2После`n%a%
return

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2014-08-05T08:45:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85631#p85631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85267#p85267" />
			<content type="html"><![CDATA[<p>Спасибо, теперь корректно все отображает.</p>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2014-07-26T20:10:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85267#p85267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85266#p85266" />
			<content type="html"><![CDATA[<p>Почему не знаю, но замечал такие промахи и на небольших текстах, например при обработке HTML. <br />Для простых строк подойдёт InStr - <a href="http://forum.script-coding.com/viewtopic.php?pid=83171#p83171">http://forum.script-coding.com/viewtopi … 171#p83171</a>.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-26T19:01:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85266#p85266</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85263#p85263" />
			<content type="html"><![CDATA[<p>Решил не создавать отдельную тему, поэтому спрашиваю тут - почему RegExMatch() плохо работает с большим объемом текста(~100мб)? Я хочу найти текст, между одной строкой и другой:<br /></p><div class="codebox"><pre><code>RegExMatch(file, &quot;\Q&quot; t1 &quot;\E(.*)\Q&quot; t2 &quot;\E&quot;, result)</code></pre></div><p>Выдает совсем не то, что нужно. С малым объемом текста работает нормально.</p>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2014-07-26T18:05:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85263#p85263</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85225#p85225" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="quotebox"><blockquote><p>А вот как сделать, чтобы только цифры считало?</p></blockquote></div><p>Какие? Из [т.708|02[0] надо 708? Или 708020?</p></blockquote></div><p>Ну чтобы все цифры (708020), а то у меня не работает ни с \d ни с \d+</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-07-25T07:16:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85225#p85225</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85222#p85222" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>А вот как сделать, чтобы только цифры считало?</p></blockquote></div><p>Какие? Из [т.708|02[0] надо 708? Или 708020?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-25T06:59:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85222#p85222</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85221#p85221" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="codebox"><pre><code>sms := &quot;SMS: a | Получатель: Benjamin_Segal [т.708|02[0]&quot;

MsgBox, % RegExReplace(sms, &quot;.*?SMS:(.*?)\|.*&quot;, &quot;$1&quot;)
MsgBox, % RegExReplace(sms, &quot;.*Получатель:(.*?)\[.*&quot;, &quot;$1&quot;)
MsgBox, % RegExReplace(sms, &quot;.*\[т\.(.*)].*&quot;, &quot;$1&quot;)</code></pre></div></blockquote></div><p>Так ведь все символы считывает. Я думал, что Вы говорите считать только цифры <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p><p>А вот как сделать, чтобы только цифры считало? Мне просто интересно, а то с \d что-то у меня не выходит</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-07-25T06:56:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85221#p85221</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85214#p85214" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>sms := &quot;SMS: a | Получатель: Benjamin_Segal [т.708|02[0]&quot;

MsgBox, % RegExReplace(sms, &quot;.*?SMS:(.*?)\|.*&quot;, &quot;$1&quot;)
MsgBox, % RegExReplace(sms, &quot;.*Получатель:(.*?)\[.*&quot;, &quot;$1&quot;)
MsgBox, % RegExReplace(sms, &quot;.*\[т\.(.*)].*&quot;, &quot;$1&quot;)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-25T06:21:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85214#p85214</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85209#p85209" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p><strong>Desire</strong> похвально. Ну а если такая строка:<br /></p><div class="codebox"><pre><code>sms := &quot;SMS: a | Получатель: Benjamin_Segal [т.708|[02[0]&quot;</code></pre></div></blockquote></div><br /><div class="codebox"><pre><code>sms := &quot;SMS: a | Получатель: Benjamin_Segal [т.708|[02[0]&quot;

MsgBox, % RegExReplace(sms, &quot;.*\s\[(\d+)].*&quot;, &quot;$1&quot;)</code></pre></div><p>Не работает, а если вместо <span style="color: red">\d+</span> поставить <span style="color: red">.*</span>, то выдает все. что между этих скобок :С</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2014-07-24T19:22:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85209#p85209</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: RegExMatch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85208#p85208" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>и от &quot;[т.&quot; до &quot;]&quot;</p></blockquote></div><p>А почему это не указано в задании? <br />Как можно понять, что тут может быть только число (номер это что?).</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-24T19:20:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85208#p85208</id>
		</entry>
</feed>
