<?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=8227&amp;type=atom" />
	<updated>2013-04-12T05:53:27Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8227</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71311#p71311" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Кто нибудь может подсказать в чем ошибка в выше приведенном скрипте?</p></blockquote></div><p>Ошибка в регулярном выражении.<br /></p><div class="codebox"><pre><code>FileRead, text, C:\Program Files (x86)\Mail.Ru\angr_irds.txt

MsgBox %text%

RegExMatch(text, &quot;O)&quot;&quot;keywords&quot;&quot; content=&quot;&quot;(?&lt;keywords&gt;[^,]+, [^,]+)[\s\S]+&quot;
                . &quot;стиль3&quot;&quot;&gt;(?&lt;text&gt;[^&lt;]+)[\s\S]+&quot;
                . &quot;(?&lt;iframe&gt;&lt;iframe.*&lt;/iframe&gt;)&quot;, m)

MsgBox % m.keywords &quot;`n`n&quot;
       . m.text &quot;`n`n&quot;
       . m.iframe</code></pre></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;-</div><div class="fancy_spoiler"><p>В регулярных выражениях можно допускать самые нелепые ошибки, всё-равно их никто не заметит, или, заметив, не возьмётся исправлять</p></div></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-04-12T05:53:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71311#p71311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71303#p71303" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>По случаю, вопрос к вам</p></blockquote></div><p>С вашего позволения, не буду участвовать в пространных оффтоп-дисскусиях.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-04-11T16:55:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71303#p71303</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71301#p71301" />
			<content type="html"><![CDATA[<p>Спасибоооо, вот это помогло.</p><div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p><strong>vernikov1</strong><br />Попробуй так сЪчитать:<br /></p><div class="codebox"><pre><code>FileRead, text, *t C:\Program Files (x86)\Mail.Ru\angr_irds.txt</code></pre></div><p>Текст переменной в 28 посте надо бы оформить тэгом quote или code.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T16:28:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71301#p71301</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71300#p71300" />
			<content type="html"><![CDATA[<p><strong>vernikov1</strong><br />Попробуй так сЪчитать:<br /></p><div class="codebox"><pre><code>FileRead, text, *t C:\Program Files (x86)\Mail.Ru\angr_irds.txt</code></pre></div><p>Текст переменной в 28 посте надо бы оформить тэгом code.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-04-11T16:22:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71300#p71300</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71299#p71299" />
			<content type="html"><![CDATA[<p><strong>creature.ws</strong><br />По случаю, вопрос к вам. Какие явные приемущества даёт использование &quot;Match Object&quot;? </p><p>Ну например: чтобы сохранить и извлечь из массива совпадения, количество которых заранее неизвестно, я использую такую схему:<br /></p><div class="codebox"><pre><code>
text =
(

&lt;str&gt;str1&lt;/str&gt;

&lt;str&gt;str2&lt;/str&gt;

&lt;str&gt;str3&lt;/str&gt;

...
)

P := 0
Loop 
    P := RegExMatch(text, &quot;&lt;str&gt;(.*?)&lt;/str&gt;&quot;, Match%A_Index%, P += 1) , L := A_Index - 1
Until P = 0

Loop % L
    MsgBox %  Match%A_Index%
</code></pre></div><p>При помощи Match Object это можно упростить?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-04-11T16:17:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71299#p71299</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71296#p71296" />
			<content type="html"><![CDATA[<p>Кто нибудь может подсказать в чем ошибка в выше приведенном скрипте? Почему по переменной он не идет поиск.</p>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T13:28:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71296#p71296</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71293#p71293" />
			<content type="html"><![CDATA[<p>Уже смотрел в переменную записывается содержимое</p><div class="codebox"><pre><code>FileRead, text, C:\Program Files (x86)\Mail.Ru\angr_irds.txt

MsgBox %text%

RegExMatch(text, &quot;O)&quot;&quot;keywords&quot;&quot; content=&quot;&quot;(?&lt;keywords&gt;[^,]+, [^,]+).*&quot;
                . &quot;стиль3&quot;&quot;&gt;(?&lt;text&gt;[^&lt;]+).*&quot;
                . &quot;(?&lt;iframe&gt;&lt;iframe.*&lt;/iframe&gt;)&quot;, m)

MsgBox % m.keywords &quot;`n`n&quot;
       . m.text &quot;`n`n&quot;
       . m.iframe  </code></pre></div>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T11:51:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71293#p71293</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71292#p71292" />
			<content type="html"><![CDATA[<p>Ищет, но, видимо, не находит. Убедитесь, что файл в переменную таки считывается и считывается в нужной кодировке.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-04-11T11:47:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71292#p71292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71291#p71291" />
			<content type="html"><![CDATA[<p>В файле аналогичный тест</p><p>&lt;meta name=&quot;keywords&quot; content=&quot;Тест1, Пример1, Тест2, Пример2&quot;&gt;</p><p>&lt;h2 align=&quot;center&quot;&gt;&lt;span class=&quot;стиль3&quot;&gt;Тест 1, Тест 2: 2323&lt;/span&gt;&lt;/h2&gt;</p><p>&lt;iframe src=&quot;http://vk.com/video_ext.php?oid=204794946&amp;id=164849745&amp;hash=403a0ee93f249255&amp;hd=1&quot; width=&quot;630&quot; height=&quot;485&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</p><p>Пробовал ваш код подставить, не ищет...</p><div class="codebox"><pre><code>

FileRead, text, C:\Program Files (x86)\Mail.Ru\angr_irds.txt

RegExMatch(text, &quot;O)&quot;&quot;keywords&quot;&quot; content=&quot;&quot;(?&lt;keywords&gt;[^,]+, [^,]+).*&quot;
                . &quot;стиль3&quot;&quot;&gt;(?&lt;text&gt;[^&lt;]+).*&quot;
                . &quot;(?&lt;iframe&gt;&lt;iframe.*&lt;/iframe&gt;)&quot;, m)

MsgBox % m.keywords &quot;`n`n&quot;
       . m.text &quot;`n`n&quot;
       . m.iframe </code></pre></div>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T11:40:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71291#p71291</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71289#p71289" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Что это?</p></blockquote></div><p>Это ненавязчивый юмор.</p><p>В коде сообщения #26, вероятно, ошибка в регулярном выражении. В частности плюсик лишний, об этом говорилось уже.</p><p>В первом сообщении темы приведен образец текста и нужные его фрагменты. Регулярное выражение во втором сообщении решает задачу поиска требуемых фрагментов.</p><p>В сообщении #26 иное регулярное выражение и неизвестен текст в переменной Contents, вам нужна помощь телепата или нянька?</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-04-11T11:32:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71289#p71289</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71287#p71287" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>creature.ws пишет:</cite><blockquote><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;off</div><div class="fancy_spoiler"><p>Error in line #xx Unexpected gibberish</p></div></div></blockquote></div><p>Что это? Вы не можете объяснить, что не так в коде...</p><div class="codebox"><pre><code>FileRead, Contents, C:\Users\admin\Downloads\10\676\12311.txt

RegExMatch(Contents, &quot;O)&quot;&quot;keywords&quot;&quot; content=&quot;&quot;(?&lt;keywords&gt;[^,]+)+(?&lt;keywords2&gt;[,^,]+)+(?&lt;keywords3&gt;[^,]+).*&quot;
                
                . &quot;h2 align=&quot;&quot;center&quot;&quot;&gt;&lt;span class=&quot;&quot;стиль3&quot;&quot;&gt;(?&lt;text&gt;[^&lt;]+).*&quot;
                . &quot;(?&lt;iframe&gt;&lt;iframe.*&lt;/iframe&gt;)&quot;, m)

}
MsgBox % m.keywords &quot;` -`&quot;
       . m.keywords3 &quot;`n`n&quot;
       . m.text &quot;`n`n&quot;
       . m.iframe  </code></pre></div>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T11:23:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71287#p71287</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71286#p71286" />
			<content type="html"><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;off</div><div class="fancy_spoiler"><p>Error in line #xx Unexpected gibberish</p></div></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-04-11T11:16:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71286#p71286</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71285#p71285" />
			<content type="html"><![CDATA[<p>&quot;закорючки&quot; все работают нормально поиск осуществляется нормально (по ниже приведеному коду)... Я не могу понять почему по переменной он не может поиск осуществить</p><br /><br /><div class="codebox"><pre><code>text =
(
&lt;meta name=&quot;keywords&quot; content=&quot;Тест1, Пример1, Тест2, Пример2&quot;&gt;

&lt;h2 align=&quot;center&quot;&gt;&lt;span class=&quot;стиль3&quot;&gt;Тест 1, Тест 2: 2323&lt;/span&gt;&lt;/h2&gt;

&lt;iframe src=&quot;http://vk.com/video_ext.php?oid=204794946&amp;id=164849745&amp;hash=403a0ee93f249255&amp;hd=1&quot; width=&quot;630&quot; height=&quot;485&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
)

RegExMatch(text, &quot;O)&quot;&quot;keywords&quot;&quot; content=&quot;&quot;(?&lt;keywords&gt;[^,]+)+(?&lt;keywords2&gt;[,^,]+)+(?&lt;keywords3&gt;[^,]+).*&quot;
                
                . &quot;h2 align=&quot;&quot;center&quot;&quot;&gt;&lt;span class=&quot;&quot;стиль3&quot;&quot;&gt;(?&lt;text&gt;[^&lt;]+).*&quot;
                . &quot;(?&lt;iframe&gt;&lt;iframe.*&lt;/iframe&gt;)&quot;, m)


MsgBox % m.keywords &quot;` -`&quot;
       . m.keywords3 &quot;`n`n&quot;
       . m.text &quot;`n`n&quot;
       . m.iframe </code></pre></div>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T11:07:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71285#p71285</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71282#p71282" />
			<content type="html"><![CDATA[<p>А просто посмотреть во 2 пост, и увидеть что не надо ничем экранировать имена переменных для поиска...<br />И всё равно на выходе будет пусто, ибо:<br /></p><div class="codebox"><pre><code>Зачем нужен финальный + в (?&lt;keywords&gt;[^,]+)+?
Что вы подразумеваете включая в регулярное выражение [,^,]?</code></pre></div><p>Перед тем как изменятьсамостоятельно довольно сложный шаблон для поиска, надо сначала понять что значат все эти &quot;закорючки&quot;.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2013-04-11T10:48:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71282#p71282</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Выбор из файла определенных нескольких значений]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=71281#p71281" />
			<content type="html"><![CDATA[<p>Пробовал убрать %, поставить “. Это не помогает…</p>]]></content>
			<author>
				<name><![CDATA[vernikov1]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29954</uri>
			</author>
			<updated>2013-04-11T10:41:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=71281#p71281</id>
		</entry>
</feed>
