<?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=10303&amp;type=atom" />
	<updated>2015-01-04T13:59:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10303</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечь домен ссылки в адресной строки браузера]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89979#p89979" />
			<content type="html"><![CDATA[<p>Действительно что то я не понял сразу..<br />Все работает!<br />Благодарствую <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-01-04T13:59:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89979#p89979</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечь домен ссылки в адресной строки браузера]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89977#p89977" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Что то не то, мне не надо перебирать каждую переменную</p></blockquote></div><div class="quotebox"><blockquote><p>Просто я написал возможные варианты.</p></blockquote></div><p>Ммм, как-бэ для проверки сделано.<br /></p><div class="quotebox"><blockquote><p>В вашем варианте если подставить этот URL уже не работает:</p></blockquote></div><p>В вашем варианте - нет, в моём вроде также продолжает работать<br /></p><div class="codebox"><pre><code>URL = http://alucky.globus-inter.com

RegExMatch(&quot;://&quot; URL &quot;/&quot;, &quot;.*(://www\.|://?)(.*?)/&quot;, Found)
    URLFound = %Found2%

MsgBox %URLFound%
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-01-04T13:47:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89977#p89977</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечь домен ссылки в адресной строки браузера]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89975#p89975" />
			<content type="html"><![CDATA[<p>Что то не то, мне не надо перебирать каждую переменную, она будет одна полученная из строки браузера. Просто я написал возможные варианты.<br />В вашем варианте если подставить этот URL уже не работает:<br /></p><div class="codebox"><pre><code>URL = http://alucky.globus-inter.com

RegExMatch(URL, &quot;.*(://www\.|://?)(.*?)/&quot;, Found)
    URLFound = %Found2%

MsgBox %URLFound%
return</code></pre></div><p>Из адресной строки браузера надо получить домен вида site.ru или sub.site.ru отсеяв возможные варианты текста спереди и сзади домена:</p><p>site.ru<br />www.site.ru<br />http://site.ru<br />https://site.ru<br />ftp://site.ru<br />http://www.site.ru<br />https://www.site.ru<br />ftp://www.site.ru</p><p>site.ru<br />site.ru/<br />site.ru/index/web<br />site.ru/index/&amp;s=http://web.ru</p><p>из всех возможных вариантов ссылок в адресной строке браузара надо получить только домен сайта: &quot;site.ru&quot;</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-01-04T13:41:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89975#p89975</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Извлечь домен ссылки в адресной строки браузера]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89973#p89973" />
			<content type="html"><![CDATA[<p>На скорую руку:<br /></p><div class="codebox"><pre><code>
URL1 = alucky.globus-inter.com
URL2 = http://alucky.globus-inter.com
URL3 = http://alucky.globus-inter.com/
URL4 = http://alucky.globus-inter.com/index.php/for-users.php
URL5 = https://alucky.globus-inter.com/index.php/for-advertisers.php
URL6 = http://www.alucky.globus-inter.com/index.php/for-advertisers.php
URL7 = ftp://alucky.globus-inter.com/index.php/for-users.php
URL8 = alucky.globus-inter.com/index.php/for-users.php
URL9 = https://www.google.com.ua/search?q=http://alucky.globus-inter.com/index.php/for-users.php
URL10 = www.alucky.globus-inter.com/index.php/for-users.php
 
While URL%A_Index% != &quot;&quot;
{
    RegExMatch(&quot;://&quot; URL%A_Index% &quot;/&quot;, &quot;.*(://www\.|://?)(.*?)/&quot;, Found)
    MsgBox, , % A_Index, % URL%A_Index% &quot;`n`n`n&quot; Found2
}

</code></pre></div><p>с необязательными шаблонами, незадалось, потому подставил их в саму переменную.</p><div class="codebox"><pre><code>&quot;://&quot; URL%A_Index% &quot;/&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-01-04T12:32:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89973#p89973</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Извлечь домен ссылки в адресной строки браузера]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89972#p89972" />
			<content type="html"><![CDATA[<p>Можно ли из этих возможных URL адресов в адресной строке, извлечь домен сайта: &quot;alucky.globus-inter.com&quot; или любого другого возможного сайта<br />И лучше что бы вместить эту операцию если возможно в одну команду RegExMatch<br />В скрипте представлены возможные варианты текста спереди и сзади адреса домена:<br /></p><div class="codebox"><pre><code>; F1::
; Send, ^{sc02E}  ;Ctrl+C
; ClipWait 0.8
; URL := clipboard

; URL = alucky.globus-inter.com
; URL = http://alucky.globus-inter.com
; URL = http://alucky.globus-inter.com/
; URL = http://alucky.globus-inter.com/index.php/for-users.php
; URL = https://alucky.globus-inter.com/index.php/for-advertisers.php
; URL = http://www.alucky.globus-inter.com/index.php/for-advertisers.php
; URL = ftp://alucky.globus-inter.com/index.php/for-users.php
; URL = www.alucky.globus-inter.com/index.php/for-users.php
; URL = alucky.globus-inter.com/index.php/for-users.php
; URL = http://alucky.globus-inter.com/search?q=http://site.ru/index.html

URL = ???

If RegExMatch(URL, &quot;???&quot;, Found)
    DomainFound = %Found1%

MsgBox %DomainFound%
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-01-04T11:27:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89972#p89972</id>
		</entry>
</feed>
