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

	<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>2002-11-10T16:23:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-11-10T16:23:39-04:00</updated>

		<published>2002-11-10T16:23:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13003#p13003</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13003#p13003"/>
		<title type="html"><![CDATA[Simple parse]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13003#p13003"><![CDATA[
I've tried looking through google.tcl, and I must confess, it's a little too complicated for me.. <br><br>However I've found another script that was far more simple, but not nearly as advanced, and therefore more difficult to get to do what I want..<br><div class="codebox"><p>Code: </p><pre><code>set radio_url "http://213.114.155.110:8000/7.html"bind pub - !users users_getproc users_get {nick mask hand chan args} {global radio_urlset file [open "|lynx -source $radio_url" r]set html "[gets $file]"regsub "&lt;HTML&gt;&lt;meta http-equiv=\"Pragma\" content=\"no-cache\"&gt;&lt;/head&gt;" $html "" html      regsub "&lt;body&gt;" $html "\002 Listeners: \002" htmlputchan $chan $html}</code></pre></div>The webpage is following:<blockquote class="uncited"><div>&lt;HTML&gt;&lt;meta http-equiv="Pragma" content="no-cache"&gt;&lt;/head&gt;&lt;body&gt;4,1,8,80,4,128,Fpu - Racer Car (Voidcom)&lt;/body&gt;&lt;/html&gt;</div></blockquote>And the script returns:<blockquote class="uncited"><div>  Listeners: 4,1,8,80,4,128,Fpu - Racer Car (Voidcom)&lt;/body&gt;&lt;/html&gt;</div></blockquote>My question is... Can <strong class="text-strong">regsub</strong> be used in such a way, that it ignores all text from the first comma and forward.. So it returns this:<blockquote class="uncited"><div>  Listeners: 4</div></blockquote>I hope it is detailed enough this time <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by Guest — Sun Nov 10, 2002 4:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-11-10T14:58:11-04:00</updated>

		<published>2002-11-10T14:58:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13000#p13000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13000#p13000"/>
		<title type="html"><![CDATA[Simple parse]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13000#p13000"><![CDATA[
A nice simple page.<br><br>First off, you should learn how to use the HTTP package for Tcl. As stated, google.tcl uses this, so is a good place to an example.<br><br>Using the data it downloads, you will can start paring the contents.<br><br>Once simple idea, would be to locate the end of the tag &lt;BODY&gt;. This can be done using some of the simplified commands Tcl provides.<br><br>You would then save all content up to the &lt;/BODY&gt; tag, again with the provided commands.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Nov 10, 2002 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-11-10T14:51:42-04:00</updated>

		<published>2002-11-10T14:51:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12999#p12999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12999#p12999"/>
		<title type="html"><![CDATA[Simple parse]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12999#p12999"><![CDATA[
Sorry I wasn't more precise in my question..<br><br>This is the page i'm talking about: <a href="http://213.114.155.110:8000/7.html" class="postlink">http://213.114.155.110:8000/7.html</a><br><br>But thanks anyway! For your fast answer.. I'm thanful for that!<br><br>If you could give me some more pointers i'll be delighted!<br><blockquote class="uncited"><div>I am afraid, we will direct you to large documentation.<br><br>However, we we will give you pointers on where to be looking within it.<br><br>First, you say it's HTML page, but what you posted isn't. SO I am guessing, that that text is embeded somwhere within the HTML page tiself.<br><br>First thing I sugest, is to download google.tcl, then  read through the Tcl docs and see whop to download the HTML page. This part is straight forward.<br><br>Next, You will need to make the Tcl, parse through, and locate the text in question.<br><br>A series of string commands, or regexps should get you to this location, by looking at the ltext, for strings of texts, that remain within the page, even if the page is dynamicly generated.<br><br>Once you have obtained the text, and stored it in a variable, you can use "split" and "lindex" to obtaint he values you need.<br><br>I fyou need any more ifnormation, you will need to ask specific questions. Simply saying I need A from a web-page, wihtout giving any other details about the page contents, is simply a non-starter for us. Only you know what the content is so far.</div></blockquote><p>Statistics: Posted by Guest — Sun Nov 10, 2002 2:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-11-10T14:07:39-04:00</updated>

		<published>2002-11-10T14:07:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12996#p12996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12996#p12996"/>
		<title type="html"><![CDATA[Simple parse]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12996#p12996"><![CDATA[
I am afraid, we will direct you to large documentation.<br><br>However, we we will give you pointers on where to be looking within it.<br><br>First, you say it's HTML page, but what you posted isn't. SO I am guessing, that that text is embeded somwhere within the HTML page tiself.<br><br>First thing I sugest, is to download google.tcl, then  read through the Tcl docs and see whop to download the HTML page. This part is straight forward.<br><br>Next, You will need to make the Tcl, parse through, and locate the text in question.<br><br>A series of string commands, or regexps should get you to this location, by looking at the ltext, for strings of texts, that remain within the page, even if the page is dynamicly generated.<br><br>Once you have obtained the text, and stored it in a variable, you can use "split" and "lindex" to obtaint he values you need.<br><br>I fyou need any more ifnormation, you will need to ask specific questions. Simply saying I need A from a web-page, wihtout giving any other details about the page contents, is simply a non-starter for us. Only you know what the content is so far.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Nov 10, 2002 2:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-11-10T12:06:12-04:00</updated>

		<published>2002-11-10T12:06:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12991#p12991</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12991#p12991"/>
		<title type="html"><![CDATA[Simple parse]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12991#p12991"><![CDATA[
I need help on how to parse information from a simple HTML page...<br><br><strong class="text-strong">for example:</strong><br><br>This is the HTML-page:<br><blockquote class="uncited"><div>9,1,16,80,9,128,some text</div></blockquote>And i need the script to return the first number (<strong class="text-strong">9</strong>) on <strong class="text-strong">!first</strong> and "<strong class="text-strong">some text</strong>" on <strong class="text-strong">!second</strong><br><br><br>Please don't redirect me to some large documentation!.. I'm still quite a nub in tcl-scripting...<br><br>Hope someone can help...<p>Statistics: Posted by Guest — Sun Nov 10, 2002 12:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
