<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Замена пробела в переменной на другой символ]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11039&amp;type=atom" />
	<updated>2015-10-29T14:47:49Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=11039</id>
		<entry>
			<title type="html"><![CDATA[Re: Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98479#p98479" />
			<content type="html"><![CDATA[<p>OFF: Это-ж сколько кода теперь перелапачивать...</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-10-29T14:47:49Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98479#p98479</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98475#p98475" />
			<content type="html"><![CDATA[<p><a href="http://ahkscript.org/v2/v2-changes.htm">http://ahkscript.org/v2/v2-changes.htm</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-10-29T14:02:05Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98475#p98475</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98472#p98472" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Malcev пишет:</cite><blockquote><p>В будущих версиях ahk от него избавятся.</p></blockquote></div><p>Откуда такая информация?</p>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-10-29T13:49:56Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98472#p98472</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98465#p98465" />
			<content type="html"><![CDATA[<p>Решение не совсем верное:<br /></p><div class="codebox"><pre><code>bl = OldNick Name
stringreplace,bl,bl,%a_space%,_,all
msgbox % bl
Return</code></pre></div><p>О такого метода присваивания я бы отучивался.<br /></p><div class="codebox"><pre><code>bl = Nick Name</code></pre></div><p>В будущих версиях ahk от него избавятся.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-10-29T12:49:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98465#p98465</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98462#p98462" />
			<content type="html"><![CDATA[<p>Для завершения, проще использовать <a href="http://www.script-coding.com/AutoHotkey/StringReplace.html">stringreplace</a>.<br /></p><div class="codebox"><pre><code>!1::
bl = Nick Name
stringreplace,bl,bl,%a_space%,_,all
SendInput, {F6}%bl%{Enter}
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2015-10-29T12:14:46Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98462#p98462</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98457#p98457" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Turambar пишет:</cite><blockquote><p>Подскажите, пожалуйста, что я делаю не так?</p></blockquote></div><p>Для начала, путаете <em>RegExReplace</em> и <em>RegExMatch</em>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-10-29T09:33:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98457#p98457</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Замена пробела в переменной на другой символ]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=98456#p98456" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Суть проблемы такова. Есть переменная bl. В ней может содержаться строка либо такая &quot;Nick Name&quot;, либо такая: &quot;Nick_Name&quot;.<br />Мне нужно в случае наличия пробела заменить его на &quot;_&quot;.</p><div class="codebox"><pre><code>!1::
bl = Nick Name
if RegExMatch(bl, &quot; &quot;)   ; если в переменной содержится пробел, то...
{
RegExReplace(bl, &quot;^(.*) (.*)$&quot;, probel)  ;пытаюсь разбить содержимое переменной на две части: до и после пробела
Itog = %probel1%_%probel2%   ; в переменную Itog записываю те две части и между ними _
SendInput, {F6}%Itog%{Enter}   ; вывожу переменную &quot;Itog&quot;
}
Return</code></pre></div><p>По непонятной мне причине переменная Itog принимает значение &quot;_&quot;. А должно быть &quot;Nick_Name&quot;.<br />Проверил используемое регулярное выражение в интернете на сайтах тестирования, всё вроде бы нормально с ним.</p><p>Подскажите, пожалуйста, что я делаю не так?</p>]]></content>
			<author>
				<name><![CDATA[Turambar]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33097</uri>
			</author>
			<updated>2015-10-29T09:22:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=98456#p98456</id>
		</entry>
</feed>
