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

	<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>2015-12-23T21:00:52-04:00</updated>

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

		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-12-23T21:00:52-04:00</updated>

		<published>2015-12-23T21:00:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104604#p104604</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104604#p104604"/>
		<title type="html"><![CDATA[Remove everything from last occurence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104604#p104604"><![CDATA[
<blockquote class="uncited"><div>Will this remove "-" in addition to everything after it?</div></blockquote>Are you familiar with using the <br>.tcl<br>command in the partyline?  <br><br>If not, perhaps what I put in my post is not something you instantly recognize, and you need to look that up and get familiar with it.   It is very handy, at times.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Dec 23, 2015 9:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-12-23T20:58:09-04:00</updated>

		<published>2015-12-23T20:58:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104603#p104603</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104603#p104603"/>
		<title type="html"><![CDATA[Remove everything from last occurence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104603#p104603"><![CDATA[
<blockquote class="uncited"><div>Will this remove "-" in addition to everything after it?</div></blockquote>??<br>That's copy-n-paste, in my post above.  It shows you exactly what it does.<br><br>Better yet, experiment with it in a script on your own bot.     <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>If it doesn't do what you wanted, then most likely it means that I didn't understand what you actually wanted.<br><br>Let us know how it goes.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Dec 23, 2015 8:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maphex]]></name></author>
		<updated>2015-12-23T20:24:46-04:00</updated>

		<published>2015-12-23T20:24:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104602#p104602</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104602#p104602"/>
		<title type="html"><![CDATA[Remove everything from last occurence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104602#p104602"><![CDATA[
Will this remove "-" in addition to everything after it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11913">maphex</a> — Wed Dec 23, 2015 8:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-12-23T10:26:11-04:00</updated>

		<published>2015-12-23T10:26:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104601#p104601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104601#p104601"/>
		<title type="html"><![CDATA[Re: Remove everything from last occurence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104601#p104601"><![CDATA[
From the partyline in a bot of mine:<br><div class="codebox"><p>Code: </p><pre><code>[09:18] &lt;mynick&gt; .set text abc-def-ghi-jkl-mno-pqr-stu-vwx-yz[09:18] &lt;botnick&gt; [14:18:30] #jacky# set text abc-def-ghi-jkl-mno-pqr-stu-vwx-yz[09:18] &lt;botnick&gt; Ok, set.[09:18] &lt;mynick&gt; .tcl regsub -start [string last \- $text] {\-.*} $text ""[09:18] &lt;botnick&gt; Tcl: abc-def-ghi-jkl-mno-pqr-stu-vwx</code></pre></div>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Dec 23, 2015 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[maphex]]></name></author>
		<updated>2015-12-22T00:04:07-04:00</updated>

		<published>2015-12-22T00:04:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104600#p104600</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104600#p104600"/>
		<title type="html"><![CDATA[Remove everything from last occurence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104600#p104600"><![CDATA[
Trying my hand at some regex. I'm trying to take a string and remove everything after the last occurrence of and symbol. <br>I'm using <div class="codebox"><p>Code: </p><pre><code>regsub {\-.*} $text ""</code></pre></div> but it only works if there is only one occurrence of "-" but if text has more than one "-" it removing everything from the first occurrence back. Any help?<br>I have tried to use string and trim right but that doesn't help either<div class="codebox"><p>Code: </p><pre><code>string range $text 0 [string last \- $text]-1</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11913">maphex</a> — Tue Dec 22, 2015 12:04 am</p><hr />
]]></content>
	</entry>
	</feed>
