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

	<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>2009-11-28T22:49:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[NewzNZ]]></name></author>
		<updated>2009-11-28T22:49:34-04:00</updated>

		<published>2009-11-28T22:49:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91122#p91122</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91122#p91122"/>
		<title type="html"><![CDATA[removing end of a string]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91122#p91122"><![CDATA[
ah yep thanks speechles...that's cool. it's like the '$mid' use in mIRC scripting that I was looking for.<br><br>thanks also!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10525">NewzNZ</a> — Sat Nov 28, 2009 10:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-11-28T22:27:01-04:00</updated>

		<published>2009-11-28T22:27:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91121#p91121</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91121#p91121"/>
		<title type="html"><![CDATA[removing end of a string]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91121#p91121"><![CDATA[
<blockquote class="uncited"><div>eg.<br>African Markets - Factors to watch on Nov 27 27 Nov 2009<br>appears as just:<br>African Markets - Factors to watch on</div></blockquote>If it's always 3 space separated elements at the end you want omitted. You can use join, lrange and split to do it as well, assuming $text is our string.<br><br>set text [join [lrange [split $text] 0 end-3]]<blockquote class="uncited"><div>&lt;speechles&gt; .tcl set text "African Markets - Factors to watch on Nov 27 27 Nov 2009" <br>&lt;bot&gt; Tcl: African Markets - Factors to watch on Nov 27 27 Nov 2009<br>&lt;speechles&gt; .tcl set text [join [lrange [split $text] 0 end-3]]<br>&lt;bot&gt; Tcl: African Markets - Factors to watch on Nov 27</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Nov 28, 2009 10:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzNZ]]></name></author>
		<updated>2009-11-28T21:53:12-04:00</updated>

		<published>2009-11-28T21:53:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91120#p91120</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91120#p91120"/>
		<title type="html"><![CDATA[removing end of a string]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91120#p91120"><![CDATA[
thanks for those ideas nml375...<br><br>I actually got it working using regexp by putting the data variable at the end...should have thought of it earlier!<br><br>thanks again  =)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10525">NewzNZ</a> — Sat Nov 28, 2009 9:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-11-27T03:48:11-04:00</updated>

		<published>2009-11-27T03:48:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91087#p91087</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91087#p91087"/>
		<title type="html"><![CDATA[removing end of a string]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91087#p91087"><![CDATA[
I suppose ome way around would be to use the string range command. You'd have to get the length of the strings first though (string length) and do some maths...<br><br>Not sure if string trimright would do the trick either?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Nov 27, 2009 3:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzNZ]]></name></author>
		<updated>2009-11-27T02:52:05-04:00</updated>

		<published>2009-11-27T02:52:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91086#p91086</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91086#p91086"/>
		<title type="html"><![CDATA[removing end of a string]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91086#p91086"><![CDATA[
Hi - I'm trying to get rid of the date/month/year on the end of these news headlines:<br><br>UK's Brown hopes Zimbabwe can rejoin Commonwealth    27 Nov 2009<br><br>At the moment I'm doing it by setting the 27 Nov 2009 part as a variable from another part of the webpage, and doing a string trimright to remove the variable. The problem then is, whenever a 27 or Nov or 2009 appears in the actual headline itself, it's trimming everything else with it:<br><br>eg.<br>African Markets - Factors to watch on Nov 27    27 Nov 2009<br>appears as just:<br>African Markets - Factors to watch on<br><br>any help to just lose the right-hand side date would be much appreciated!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10525">NewzNZ</a> — Fri Nov 27, 2009 2:52 am</p><hr />
]]></content>
	</entry>
	</feed>
