<?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="http://forum.script-coding.com/extern.php?action=feed&amp;tid=9353&amp;type=atom" />
	<updated>2014-03-12T16:15:23Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=9353</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80733#p80733" />
			<content type="html"><![CDATA[<p>Ну как же, иногда они просто незаменимы. <br />Просто освоить их, многим трудно, а про простейшие функции почему то забывают.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-03-12T16:15:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80733#p80733</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80730#p80730" />
			<content type="html"><![CDATA[<p>Да регулярные выражения вообще не нужны если есть instr &amp; substr <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[bWRmeA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31915</uri>
			</author>
			<updated>2014-03-12T16:05:21Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80730#p80730</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80727#p80727" />
			<content type="html"><![CDATA[<p>Для этой задачи достаточно InStr &amp; SubStr.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-03-12T16:00:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80727#p80727</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80726#p80726" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>var := &quot;http://site.net/test.rarhttp://site.net/test.ziphttp://site.net/test.rar&quot;
regexmatch(var, &quot;http://(.(?!http://))+\.zip&quot;, match)
msgbox % match</code></pre></div><p>В том и недостаток регекспов, что для каждой конкретной задачи уместно писать новое выражение, а не использовать заготовки.</p>]]></content>
			<author>
				<name><![CDATA[bWRmeA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31915</uri>
			</author>
			<updated>2014-03-12T15:55:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80726#p80726</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80720#p80720" />
			<content type="html"><![CDATA[<p>На практике, двоеточие может встретится в одном урл не один раз.<br /><a href="http://www.script-coding.com/URL.html">http://www.script-coding.com/URL.html</a></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-03-12T14:45:45Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80720#p80720</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80707#p80707" />
			<content type="html"><![CDATA[<p>В Regular Expression Callouts в Auto-Callout есть скрипт для дебага выражений, пользуйся, вникай, читай документацию PCRE.</p>]]></content>
			<author>
				<name><![CDATA[bWRmeA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31915</uri>
			</author>
			<updated>2014-03-12T11:07:57Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80707#p80707</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80705#p80705" />
			<content type="html"><![CDATA[<p>Спасибо. Сейчас дошло <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />А почему в первом примере не ищется справа на лево?<br />Какова тогда функция \K ?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-03-12T11:00:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80705#p80705</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80702#p80702" />
			<content type="html"><![CDATA[<p>Потому что двоеточие в var - условный разделитель для кучи ссылок.</p><p>Кстати, в первом примере нет запроса назад. \K отбрасывает часть результата, но выражение всё так же ищется слева на право.</p>]]></content>
			<author>
				<name><![CDATA[bWRmeA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31915</uri>
			</author>
			<updated>2014-03-12T10:41:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80702#p80702</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80701#p80701" />
			<content type="html"><![CDATA[<p>А почему именно двоеточием?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-03-12T10:32:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80701#p80701</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80699#p80699" />
			<content type="html"><![CDATA[<p>[^:] - один символ не являющийся двоеточием.</p><p>Принцип работы: var начинает посимвольно обрабатываться слева на право, выражение начинается с &quot;h&quot; поэтому ищется именно этот символ. Первый символ var соответствует первому символу выражения - позиция &quot;h&quot; в var запоминается и начинается проверка соответствия выражению символов следующих после &quot;h&quot;, если используется &quot;.+&quot; то после http будут найдены&nbsp; все символы до .zip <br />Когда используется [^:]+ ищется любой символ но не &quot;:&quot;, потому, при достижении второго двоеточия в var поиск проваливается и начинается с сохранённой позиции &quot;h&quot; + 1 ( вновь ищется h ) со второй попытки находится начало нужной ссылки, в теле которой двоеточие отсутствует - успех, ликование, финиш.</p>]]></content>
			<author>
				<name><![CDATA[bWRmeA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31915</uri>
			</author>
			<updated>2014-03-12T10:23:26Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80699#p80699</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80695#p80695" />
			<content type="html"><![CDATA[<p>Спасибо!<br />А можете объяснить принцип работы?<br />Как это понять? </p><div class="codebox"><pre><code>[^:]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-03-12T10:15:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80695#p80695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80692#p80692" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, Для абстрактной кучи ссылок:<br /></p><div class="codebox"><pre><code>RegExMatch(var, &quot;http://[^:]+\.zip&quot;, m)
MsgBox % m</code></pre></div><p>---------------<br /></p><div class="quotebox"><blockquote><p>Внимание! Исправьте следующие ошибки, чтобы добавить сообщение:</p><p>&nbsp; &nbsp; Слишком много ссылок в сообщении. Разрешено 3 ссылок. Уменьшите количество ссылок.</p></blockquote></div><p>Да вы верно шутите.</p>]]></content>
			<author>
				<name><![CDATA[bWRmeA]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31915</uri>
			</author>
			<updated>2014-03-12T10:00:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80692#p80692</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Избавиться от жадности при запросе назад]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80689#p80689" />
			<content type="html"><![CDATA[<p>Подскажите, пожалуйста, как добиться того, чтобы в куче текста велся поиск по расширению zip<br />А потом брался ближащий к нему http<br />Вот неработающий абстрактный пример: <br /></p><div class="codebox"><pre><code>var := &quot;http://site.net/test.rarhttp://site.net/test.ziphttp://site.net/test.rar&quot;
regexmatch(var, &quot;(http.+?\K\.zip)&quot;, match)
msgbox % match1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-03-12T09:02:58Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80689#p80689</id>
		</entry>
</feed>
