<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Точки в числах]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=13102</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=13102&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Точки в числах».]]></description>
		<lastBuildDate>Thu, 09 Nov 2017 18:04:35 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120991#p120991</link>
			<description><![CDATA[<p>И проще:<br /></p><div class="codebox"><pre><code>nums := [          1
        ,       -123
        ,       1234
        ,    -123456
        ,    1234567
        ,   -1234567.1
        ,    1234567.123
        ,   -1234567.1234
        ,    1234567.123456
        ,  -12345678.12345678
        ,   12345678.123456789
        , -123456789.123456789 ]
        
for k, v in nums
   MsgBox, % RegExReplace(v, &quot;x) ^-?\d??\K\d(?=(\d{3})+(\.|$)) | (?1)(?!(\.|$))&quot;, &quot;$0,&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 09 Nov 2017 18:04:35 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120991#p120991</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120986#p120986</link>
			<description><![CDATA[<p>Решилось:<br /></p><div class="codebox"><pre><code>nums := [         1
        ,       123
        ,      1234
        ,    123456
        ,   1234567
        ,   1234567.1
        ,   1234567.123
        ,   1234567.1234
        ,   1234567.123456
        ,  12345678.12345678
        ,  12345678.123456789
        , 123456789.123456789 ]
        
for k, v in nums
   MsgBox, % RegExReplace(v, &quot;x) \d{1,3}(?=(\d{3})+\.) | \G(\A[^\.]*)?+.*?\K\d{3}(?!(\.|$)) | \d(?=(\d{3})+$)&quot;, &quot;$0,&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 09 Nov 2017 14:41:58 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120986#p120986</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120330#p120330</link>
			<description><![CDATA[<p><img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Нет, дробная часть может не существовать.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 23 Oct 2017 10:37:50 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120330#p120330</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120328#p120328</link>
			<description><![CDATA[<p>Ты имеешь в виду корректно - это так?<br /></p><div class="codebox"><pre><code>number := &quot;1234500,1234567&quot;
MsgBox, % RegExReplace(number, &quot;\d(?=(\d{3})+,)|\d{3}(?!(.*,|$))&quot;, &quot;$0.&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 23 Oct 2017 10:33:48 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120328#p120328</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120326#p120326</link>
			<description><![CDATA[<p>Ну это же просто задача. Для начала можно попробовать заставить корректно работать предыдущий пример, у меня пока тоже не получилось.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Mon, 23 Oct 2017 09:43:08 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120326#p120326</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120320#p120320</link>
			<description><![CDATA[<p>А нужно ли прям-таки все числа так разбивать?<br />Например, год будет выглядеть странно: родился в 1 980 году.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 23 Oct 2017 05:45:36 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120320#p120320</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120302#p120302</link>
			<description><![CDATA[<p>Чтобы числа, оставаясь в тексте, были поразрядно разбиты пробелами, в том числе и дробная часть:<br /></p><div class="codebox"><pre><code>Var =
(
Hello, World!
AHK 1 234 567 890.000 678 9 AutoHotkey
12 345 000
Bye!
1 234 567 890.000 678 9
)</code></pre></div><p>Оказывается, <a href="http://forum.script-coding.com/viewtopic.php?pid=120263#p120263">этот</a> мой код некорректный:<br /></p><div class="codebox"><pre><code>number := &quot;1234500,1234567&quot;
MsgBox, % RegExReplace(number, &quot;\d(?=(\d{3})+(,|$))|\d{3}(?!(.*,|$))&quot;, &quot;$0.&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 22 Oct 2017 18:55:06 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120302#p120302</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120298#p120298</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Кто корректно разобьёт пробелами числа в этом примере, в том числе после точки? У меня пока не вышло.</p></blockquote></div><p>А что должно быть на выходе, задачу не понял.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sun, 22 Oct 2017 17:26:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120298#p120298</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120273#p120273</link>
			<description><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><div class="quotebox"><cite>sanniauto пишет:</cite><blockquote><p><strong>ypppu</strong>, исправил.</p></blockquote></div><p><span style="color: green">Это ещё не всё. Отредактируйте и здесь тоже:</span><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120250#p120250">http://forum.script-coding.com/viewtopi … 50#p120250</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120249#p120249">http://forum.script-coding.com/viewtopi … 49#p120249</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120193#p120193">http://forum.script-coding.com/viewtopi … 93#p120193</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120191#p120191">http://forum.script-coding.com/viewtopi … 91#p120191</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120187#p120187">http://forum.script-coding.com/viewtopi … 87#p120187</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120182#p120182">http://forum.script-coding.com/viewtopi … 82#p120182</a>.</p></blockquote></div><p>Я отредактировал и исправил.</p>]]></description>
			<author><![CDATA[null@example.com (sanniauto)]]></author>
			<pubDate>Sat, 21 Oct 2017 14:56:58 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120273#p120273</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120272#p120272</link>
			<description><![CDATA[<div class="quotebox"><cite>red2881 пишет:</cite><blockquote><p>Формат числа с разрядностью <a href="http://forum.script-coding.com/viewtopic.php?id=12159">http://forum.script-coding.com/viewtopic.php?id=12159</a></p></blockquote></div><p>Кстати, в моём варианте \G не используется, а вот в таком случае оно не поможет:<br /></p><div class="codebox"><pre><code>Var =
(
Hello, World!
AHK 1234567890.0006789 AutoHotkey
12345000
Bye!
1234567890.0006789
)

Result := RegExReplace(Var, &quot;\G\d+?(?=(?:\d{3})+(?:\D|$))&quot;, &quot;$0 &quot;)
MsgBox %Result%</code></pre></div><p>Кто корректно разобьёт пробелами числа в этом примере, в том числе после точки? У меня пока не вышло.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 21 Oct 2017 10:44:51 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120272#p120272</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120271#p120271</link>
			<description><![CDATA[<p><strong>sanniauto</strong>, если вам еще непонятны регулярные выражения, то такие задачи можно решать через SubStr:<br /></p><div class="codebox"><pre><code>number := &quot;1234500&quot;, Start := -2, Length := 3
loop
{
   if StrLen(number)&gt;A_Index*Length
   {
      Newnumber := &quot;.&quot; SubStr(number, Start, Length) Newnumber
      start-=3
   }
   else
   {
      Newnumber := SubStr(number, 1, StrLen(number)-(A_Index-1)*Length) Newnumber
      break
   }
}
msgbox % Newnumber</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sat, 21 Oct 2017 07:58:55 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120271#p120271</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120270#p120270</link>
			<description><![CDATA[<div class="quotebox"><cite>sanniauto пишет:</cite><blockquote><p><strong>ypppu</strong>, исправил.</p></blockquote></div><p><span style="color: green">Это ещё не всё. Отредактируйте и здесь тоже:</span><br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120250#p120250">http://forum.script-coding.com/viewtopi … 50#p120250</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120249#p120249">http://forum.script-coding.com/viewtopi … 49#p120249</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120193#p120193">http://forum.script-coding.com/viewtopi … 93#p120193</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120191#p120191">http://forum.script-coding.com/viewtopi … 91#p120191</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120187#p120187">http://forum.script-coding.com/viewtopi … 87#p120187</a>;<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=120182#p120182">http://forum.script-coding.com/viewtopi … 82#p120182</a>.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Sat, 21 Oct 2017 07:30:59 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120270#p120270</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120269#p120269</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, хорошо, спасибо!</p>]]></description>
			<author><![CDATA[null@example.com (sanniauto)]]></author>
			<pubDate>Sat, 21 Oct 2017 06:43:25 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120269#p120269</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120268#p120268</link>
			<description><![CDATA[<p>Расшифровывается так: если после цифры есть любое количество троек цифр после которых конец строки, такую цифру заменяем на неё же с точкой.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 21 Oct 2017 06:40:57 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120268#p120268</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Точки в числах]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=120267#p120267</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, спасибо! Ну на счёт просто - RegExReplace(number, &quot;\d(?=(\d{3})+$)&quot;, &quot;$0.&quot;) - тут я вообще не понял что как работает.</p>]]></description>
			<author><![CDATA[null@example.com (sanniauto)]]></author>
			<pubDate>Sat, 21 Oct 2017 06:37:03 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=120267#p120267</guid>
		</item>
	</channel>
</rss>
