<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/6511" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-12-31T07:19:13-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/6511</id>

		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-12-31T07:19:13-04:00</updated>

		<published>2003-12-31T07:19:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32020#p32020</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32020#p32020"/>
		<title type="html"><![CDATA[Regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32020#p32020"><![CDATA[
ermm.. the first regexp works fine... <br>from my tclsh:<blockquote class="uncited"><div>% set data "&lt;a href=\"<a href="http://ul.weather.yahoo.com/Europe/United_Kingdom/England/" class="postlink">http://ul.weather.yahoo.com/Europe/Unit ... m/England/</a><br>\"&gt;\n&lt;a href=\"<a href="http://uk.weather.yahoo.com/UKXX/UKXX0085/index_c.html" class="postlink">http://uk.weather.yahoo.com/UKXX/UKXX0085/index_c.html</a>\"&gt;"<br>&lt;a href="<a href="http://ul.weather.yahoo.com/Europe/United_Kingdom/England/" class="postlink">http://ul.weather.yahoo.com/Europe/Unit ... m/England/</a>"&gt;<br>&lt;a href="<a href="http://uk.weather.yahoo.com/UKXX/UKXX0085/index_c.html" class="postlink">http://uk.weather.yahoo.com/UKXX/UKXX0085/index_c.html</a>"&gt;<br>% regexp -nocase {&lt;a href="<a href="http://uk.weather.yahoo.com/%28.*?%29/index_c.html" class="postlink">http://uk.weather.yahoo.com/(.*?)/index_c.html</a>"&gt;} $da<br>ta ble match ;puts $match<br>UKXX/UKXX0085<br>%</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed Dec 31, 2003 7:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[t3ch^]]></name></author>
		<updated>2003-12-31T06:32:31-04:00</updated>

		<published>2003-12-31T06:32:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32017#p32017</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32017#p32017"/>
		<title type="html"><![CDATA[Regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32017#p32017"><![CDATA[
I got it working with this:<br><div class="codebox"><p>Code: </p><pre><code>regexp {&lt;a href="http://uk.weather.yahoo.com/([a-zA-Z0-9]*)/([a-zA-Z0-9]*)/index_c.html"&gt;} $data data match match2</code></pre></div>But im not sure of its the right way to do it...<br>//<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4315">t3ch^</a> — Wed Dec 31, 2003 6:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[t3ch^]]></name></author>
		<updated>2003-12-31T05:42:10-04:00</updated>

		<published>2003-12-31T05:42:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32014#p32014</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32014#p32014"/>
		<title type="html"><![CDATA[Regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32014#p32014"><![CDATA[
I got a problem with regexp.<br><br>I got this code from a web page:<div class="codebox"><p>Code: </p><pre><code>&lt;a href="http://uk.weather.yahoo.com/Europe/United_Kingdom/England/"&gt;&lt;a href="http://uk.weather.yahoo.com/UKXX/UKXX0085/index_c.html"&gt;</code></pre></div>I want to extract:<div class="codebox"><p>Code: </p><pre><code>UKXX/UKXX0085</code></pre></div>But with this regexp:<div class="codebox"><p>Code: </p><pre><code>regexp -nocase {&lt;a href="http://uk.weather.yahoo.com/(.*?)/index_c.html"&gt;} $data data match</code></pre></div>My match result is:<div class="codebox"><p>Code: </p><pre><code>Europe/United_Kingdom/England/"&gt;</code></pre></div>Full code:<br><div class="codebox"><p>Code: </p><pre><code>package require httpbind pub - !weather www:weatherproc www:weather {nick host handle chan text} {        set query $text        set data [http::data [http::geturl http://uk.search.weather.yahoo.com/search/weather_ukie?p=$query]]        regexp {&lt;a href="http://uk.weather.yahoo.com/(.*?)/index_c.html"&gt;} $data data match        puthelp "PRIVMSG $chan :$match"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4315">t3ch^</a> — Wed Dec 31, 2003 5:42 am</p><hr />
]]></content>
	</entry>
	</feed>
