<?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=12946&amp;type=atom" />
	<updated>2017-08-25T16:39:26Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12946</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В цикле перебрать все подстроки найденные регулярным выражением.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118776#p118776" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ser-bilichenko пишет:</cite><blockquote><p>А разве можно парсить по шаблону?</p></blockquote></div><p> Если шаблон - нечто более сложное, чем просто набор символов - нет.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-08-25T16:39:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118776#p118776</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В цикле перебрать все подстроки найденные регулярным выражением.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118772#p118772" />
			<content type="html"><![CDATA[<p>Спасибо огромное!!!</p>]]></content>
			<author>
				<name><![CDATA[ser-bilichenko]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33515</uri>
			</author>
			<updated>2017-08-25T14:47:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118772#p118772</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В цикле перебрать все подстроки найденные регулярным выражением.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118771#p118771" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Haystack = abcXYZ123 ABCdef123

pos := 1
While pos := RegExMatch(Haystack, &quot;i)abc(.*?)123&quot;, Match, pos), pos += StrLen(Match)
	MsgBox % Match1
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2017-08-25T14:27:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118771#p118771</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В цикле перебрать все подстроки найденные регулярным выражением.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118770#p118770" />
			<content type="html"><![CDATA[<p>А разве можно парсить по шаблону?</p>]]></content>
			<author>
				<name><![CDATA[ser-bilichenko]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33515</uri>
			</author>
			<updated>2017-08-25T14:25:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118770#p118770</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: В цикле перебрать все подстроки найденные регулярным выражением.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118769#p118769" />
			<content type="html"><![CDATA[<p>Думаю цикл <em><strong>Loop (parse a string)</strong></em> здесь больше подходит.<br /></p><div class="codebox"><pre><code>Colors = redgreenblue
Loop, parse, Colors
{
MsgBox, %A_Index% is %A_LoopField%.
If A_LoopField = e
	{
	n++
	last_pos := A_Index
	}
}
MsgBox, e встречается %n% раза `n Позиция последнего e: %last_pos%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2017-08-25T14:17:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118769#p118769</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: В цикле перебрать все подстроки найденные регулярным выражением.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=118768#p118768" />
			<content type="html"><![CDATA[<p>Доброго времени суток.<br />Пример взят из справки.</p><div class="codebox"><pre><code> FoundPos := RegExMatch(&quot;abcXYZ123&quot;, &quot;abc(.*)123&quot;, SubPat)  ; Возвращает 1 и сохраняет &quot;XYZ&quot; в SubPat1.</code></pre></div><p>А если подстрок получается n, то как обращаться к n-ому совпадению? И желательно в цикле, потому что непонятно как определить количество подстрок.</p>]]></content>
			<author>
				<name><![CDATA[ser-bilichenko]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33515</uri>
			</author>
			<updated>2017-08-25T13:42:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=118768#p118768</id>
		</entry>
</feed>
