<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12599&amp;type=atom" />
	<updated>2017-04-14T18:14:25Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12599</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115063#p115063" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Keller пишет:</cite><blockquote><p>В чем ее преимущества перед регулярными выражениями?</p></blockquote></div><p>Преимущество в том, что для ее использования не нужно знать регулярные выражения.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-14T18:14:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115063#p115063</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115057#p115057" />
			<content type="html"><![CDATA[<p><strong>Keller</strong>, кто-то из разработчиков уже выразил скепсис по этому поводу. Но тему открыли до того, как узнали об относительной несостоятельности данной библиотеки.</p>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2017-04-14T13:21:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115057#p115057</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=115056#p115056" />
			<content type="html"><![CDATA[<p>Уж простят меня модераторы, но эти вопросы не стоят отдельной темы:<br />А зачем тогда нужна такая библиотека? В чем ее преимущества перед регулярными выражениями?</p>]]></content>
			<author>
				<name><![CDATA[Keller]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33755</uri>
			</author>
			<updated>2017-04-14T08:14:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=115056#p115056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114977#p114977" />
			<content type="html"><![CDATA[<p>Ну в общем такие результаты:<br />1) Чтобы считалась переменная с нулями, то автор предложил заменить:<br /></p><div class="codebox"><pre><code>If (text = 0)</code></pre></div><p>на<br /></p><div class="codebox"><pre><code>If (text = 0 &quot;&quot;)</code></pre></div><p>Хотя переменная с одним нулём всё-равно покажет сообщение с ошибкой.</p><p>2) Если в переменной содержится путь к файлу или директории, то добавлять пробел впереди , чтобы функция не восприняла это как ссылку к файлу или директории.</p><p>3) Чтобы использовать файлы, названия которых начинается на восклицательный знак, нужно указывать полный путь к файлу, иначе функция посчитает, что мы хотим переписать файл.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-10T18:03:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114977#p114977</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114912#p114912" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>Пример со строкой из нулей в issue я привел. Если вы считаете, что я как то неправильно донес мысль - флаг вам в руки</p></blockquote></div><p>И у кого из нас в руках флаг? <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />)))<br /></p><div class="quotebox"><blockquote><p><strong>hi5 commented an hour ago</strong></p><p>Sorry but only the last one gives an error message, the first two work fine here.</p><p>Your second example should have created a file C:\users\desktop_copy.ini, it should be there.<br />The 1 indicates it hasn&#039;t been able to make a backup - There is little point in using MsgBox with files as, well it writes back the result to a file and does NOT return the changed content to a variable which you can display in a MsgBox.</p><p>The last one tries to read a file &quot;C:&quot; which of course doesn&#039;t exist (there is no such file) so it gives an error message saying it can&#039;t read it. You can pass on a variable as a filename which is what you are doing here in the second and third example.</p><p>So as far as I can see: no bugs and it works as intended.</p><p><strong>hi5 closed this an hour ago</strong></p></blockquote></div><p>Написал на оф.форум - посмотрим, что ответит.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-09T15:21:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114912#p114912</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114882#p114882" />
			<content type="html"><![CDATA[<p>&quot;Не совсем так&quot; относилось к &quot;текст не может начинаться с ! знака&quot;.<br />Там не совсем в ! дело.<br />Текст не может быть буквой существующего диска с двоеточим:<br /></p><div class="quotebox"><blockquote><p>c:, c:\, c:\\, !c:, !c:\, !c:\\</p></blockquote></div><p>А вот файлы действительно, по мнению автора, не могут начинаться с !.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-09T11:21:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114882#p114882</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114874#p114874" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>Не совсем так.</p></blockquote></div><p>Очень даже так, автор сколхозил чтение и запись в файл в свой комбайн, а отдельных параметров не выделил, впихнув все в текст. Я вроде об этом и написал тут, нет?<br />Пример со строкой из нулей в issue я привел. Если вы считаете, что я как то неправильно донес мысль - флаг вам в руки <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />, я пока единственный отписавшийся автору, мне ничего доказывать не надо.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-04-09T04:11:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114874#p114874</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114858#p114858" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>stealzy пишет:</cite><blockquote><p>На первый взгляд причина этого в том, что автор передает какие-то параметры внутри текста, из-за чего и повылезли подобные костыли; также он считает, что текст не может начинаться с ! знака.</p></blockquote></div><p>Не совсем так.<br />Я вижу 2 бага:<br />1-ый:<br />Если текст состоит из одних нулей, то выходит ошибка.<br />Пример:<br /></p><div class="codebox"><pre><code>var := &quot;000&quot;
MsgBox % TF_TrimLeft(var)</code></pre></div><p>2-ой:<br />Если название файла начинается с восклицательного знака, то либо выходит ошибка, либо ничего не происходит.<br />Например, название файла !test.txt:<br /></p><div class="codebox"><pre><code>TF_TrimLeft(&quot;!test.txt&quot;)
TF_TrimLeft(&quot;!!test.txt&quot;)
return</code></pre></div><p>Ну и обычно в баг-репорты вставляются конкретные примеры приводящие к ошибке.<br />А вы в isuue их не привели, поэтому и вышло недопонимание&nbsp; - так как действительно если в файле одни нули, то все обрезается верно.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-08T22:05:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114858#p114858</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114857#p114857" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, не стал тут отписываться, но пришел к тому же решению и вчера написал <a href="https://github.com/hi5/TF/issues/4">issue</a>. Ждал ответа автора.<br />Как видно из комментария это сравнение внесено в последней версии.<br />На первый взгляд причина этого в том, что автор передает какие-то параметры внутри текста, из-за чего и повылезли подобные костыли; также он считает, что текст не может начинаться с ! знака.<br />Я весьма разочарован в этой распиаренной на офф.форуме библиотеке.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-04-08T21:28:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114857#p114857</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114853#p114853" />
			<content type="html"><![CDATA[<p><strong>becauseim</strong>, напишите ему на оффорум про этот баг, приведя последний пример.<br />А пока закомментируйте эти строки:<br /></p><div class="codebox"><pre><code>	 If (text = 0) ; v3.6 
		{
		 MsgBox, 48, TF Lib Error, % &quot;Read Error:`npossible reason: perhaps you used ! vs &quot;&quot;!&quot;&quot; ?&quot;
		 ExitApp
		}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-08T19:30:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114853#p114853</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114811#p114811" />
			<content type="html"><![CDATA[<p><strong>mozers</strong>, нет, не возникла. И предложеный вариант пользователем <strong>Malcev</strong> не был забракован, он работает. А почему меня интересует альтернативное решение, я истолковал.</p>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2017-04-08T09:00:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114811#p114811</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114810#p114810" />
			<content type="html"><![CDATA[<p><strong>becauseim</strong><br />А у Вас не возникала мысль, что все предложенные вам варианты регулярок были забракованы не потому что они неправильны, а потому что Вы не можете четко и понятно изложить все свои пожелания?</p>]]></content>
			<author>
				<name><![CDATA[mozers]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=4112</uri>
			</author>
			<updated>2017-04-08T08:52:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114810#p114810</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114807#p114807" />
			<content type="html"><![CDATA[<p>Другого варианта нет? Т.е. с помощью TF.ahk нельзя удалить строки и символы для одного текста?<br /></p><div class="quotebox"><blockquote><p>Зачем нужна эта библиотека?</p></blockquote></div><p><strong>Malcev</strong>, без обозначений всех этих выражений, и даже после просмотра примеров из справки, я не понимаю, как отредактировать предложенное таким образом, чтобы удалялись не три, а четыре строки с начала текста, а также, например, пять, а не три символов с восьмой, а не четвертой строки.<br /></p><div class="codebox"><pre><code>
msg =
(
123
456
789
999999
000000
)
msgbox % RegexReplace(msg, &quot;^(.*?\R){3}[^\r\n]{0,3}\R?&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2017-04-08T08:30:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114807#p114807</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114799#p114799" />
			<content type="html"><![CDATA[<p>Вы всё правильно делаете.<br />Это у автора баг в библиотеке.<br />Зачем вам для удаления пары символов с начала строки нужна эта библиотека?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2017-04-08T00:01:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114799#p114799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: TF.ahk (Альтернатива регулярным выражениям)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=114796#p114796" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, что я делаю неправильно?<br /></p><div class="codebox"><pre><code>#include tf.ahk
msg =
(
123
456
789
000000
)
msgh := TF_RemoveLines(msg, 1,3)
MsgBox % TF_TrimLeft(msgh, 1, 1, 3)

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2017-04-07T22:41:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=114796#p114796</id>
		</entry>
</feed>
