<?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=15720&amp;type=atom" />
	<updated>2020-10-11T19:57:35Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15720</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142603#p142603" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Вот теперь все работает! Спасибо вам большое! Огромное даже ) Выручили вы меня очень сильно этим скриптом</p>]]></content>
			<author>
				<name><![CDATA[trez11]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41131</uri>
			</author>
			<updated>2020-10-11T19:57:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142603#p142603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142602#p142602" />
			<content type="html"><![CDATA[<p>Так попробуйте.<br /></p><div class="codebox"><pre><code>
If Haystack ~= &quot;m`a)^\s*\Q&quot; Needle &quot;\E\s*$&quot;
    MsgBox, The string was found.
Else
    MsgBox, The string was not found.
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-10-11T19:51:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142602#p142602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142601#p142601" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Большое спасибо вам ) <br />Но скрипт пишет что строка найдена, т.к. видимо значение 1.2.3.4, соответствует части строки 1.2.3.4555, а это как раз не нужно, т.е. поиск производится по всей строке целиком, а не по ее части</p>]]></content>
			<author>
				<name><![CDATA[trez11]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41131</uri>
			</author>
			<updated>2020-10-11T19:36:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142601#p142601</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142598#p142598" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>/*
If InStr(Haystack, Needle)
    MsgBox, The string was found.
Else
    MsgBox, The string was not found.
*/

Haystack =
(
2.111.2
1.2.77.88.99
1.23.4
1.2.3.4555
15.15.222.11.11
)

Needle = 1.2.3.4

If InStr(Haystack, Needle)
    MsgBox, The string was found.
Else
    MsgBox, The string was not found.





F5:: Reload</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2020-10-11T19:17:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142598#p142598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142597#p142597" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Да, может. То есть<br />123<br />1234<br />12345<br />Я не сильно умею пользоваться регулярками, но пробовал что то сам сделать, и если в качестве строки для поиска задать 123, находятся все вышеперечисленные строки, а нужен поиск не по части, а по цельной строке от начала и до конца.</p>]]></content>
			<author>
				<name><![CDATA[trez11]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41131</uri>
			</author>
			<updated>2020-10-11T18:44:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142597#p142597</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142596#p142596" />
			<content type="html"><![CDATA[<p>А в нём может быть строка типа <strong>1.2.3.4.15.15.222.11.11</strong> или <strong>2.111.21.2.3.4</strong>?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2020-10-11T18:21:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142596#p142596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как проверить файл на наличие строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142595#p142595" />
			<content type="html"><![CDATA[<p>Подскажите пожалуйста, как можно реализовать данную задачу.<br />Есть файл 10000 строк примерно такого вида<br />2.111.2<br />1.2.77.88.99<br />1.23.4<br />1.2.3.4555<br />15.15.222.11.11</p><p>Нужно например проверить есть ли такая строка 1.2.3.4 в этом списке<br />Файл большой, и будет расти.<br />Заранее спасибо за любую помощь.</p>]]></content>
			<author>
				<name><![CDATA[trez11]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41131</uri>
			</author>
			<updated>2020-10-11T17:44:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142595#p142595</id>
		</entry>
</feed>
