<?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/12947" />

	<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>2007-01-11T13:03:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-01-11T13:03:42-04:00</updated>

		<published>2007-01-11T13:03:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69601#p69601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69601#p69601"/>
		<title type="html"><![CDATA[web query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69601#p69601"><![CDATA[
or you could use break, instead of appending each result?<br><div class="codebox"><p>Code: </p><pre><code>set match ""foreach line [split $all \n] {  if {[string match *2007-* $line]} {    set match "$line"    break  }}if {$match == ""} { return }# continue with script</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Thu Jan 11, 2007 1:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2007-01-11T12:49:33-04:00</updated>

		<published>2007-01-11T12:49:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69600#p69600</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69600#p69600"/>
		<title type="html"><![CDATA[web query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69600#p69600"><![CDATA[
great thanks for the help ros...it`s working fine now.<br><br>thanks again!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Jan 11, 2007 12:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-01-11T12:03:47-04:00</updated>

		<published>2007-01-11T12:03:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69598#p69598</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69598#p69598"/>
		<title type="html"><![CDATA[web query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69598#p69598"><![CDATA[
It gets the last line because of the foreach, each time it matches, it clobbers the 1st match..  So, you should take out the foreach, or alternatively use lappend to append each subsequent match and then use lindex 0 to get the 1st match.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Jan 11, 2007 12:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2007-01-11T11:17:42-04:00</updated>

		<published>2007-01-11T11:17:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=69596#p69596</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=69596#p69596"/>
		<title type="html"><![CDATA[web query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=69596#p69596"><![CDATA[
Hi - I`m trying to retrieve the first line of a list of headlines from a webpage, but instead it gets the last one at the bottom of the list...?<br><br>Here`s the first part of the script - 2007- is what I`m using to identify the lines...<br><br>set query "<a href="http://a-website-goes-here.com" class="postlink">http://a-website-goes-here.com</a>"<br>set token [http::geturl $query]<br>set all [http::data $token]<br>    foreach line [split $all \n] {<br>    if {[string match "*2007-*" $line]} {<br><br>Thanks in advance for any help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Jan 11, 2007 11:17 am</p><hr />
]]></content>
	</entry>
	</feed>
