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

	<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-05-01T07:10:31-04:00</updated>

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

		<entry>
		<author><name><![CDATA[pipo]]></name></author>
		<updated>2007-05-01T07:10:31-04:00</updated>

		<published>2007-05-01T07:10:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72416#p72416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72416#p72416"/>
		<title type="html"><![CDATA[split line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72416#p72416"><![CDATA[
Works, thanks<br><br>And if the line is someting like:<br><br>blabla bla bla -example rarara -example fdfsdfs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8399">pipo</a> — Tue May 01, 2007 7:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-05-01T06:44:44-04:00</updated>

		<published>2007-05-01T06:44:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72414#p72414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72414#p72414"/>
		<title type="html"><![CDATA[split line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72414#p72414"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>regexp {(.*)\s-example\s(.*)} $line all one two</code></pre></div>Edit: Or you can do it faster using this method:<div class="codebox"><p>Code: </p><pre><code>if {[set i [lsearch -exact [split $line] -example]]!=-1} { set one [join [lrange [split $line] 0 [expr {$i-1}]]] set two [join [lrange [split $line] [expr {$i+1}] end]]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue May 01, 2007 6:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pipo]]></name></author>
		<updated>2007-05-01T05:29:20-04:00</updated>

		<published>2007-05-01T05:29:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72413#p72413</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72413#p72413"/>
		<title type="html"><![CDATA[split line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72413#p72413"><![CDATA[
I need some help splitting one line into two,<br>I have for example this line:<br><br>blabla bla bla -example rarara<br><br>I want the bot to announce it like this:<br>&lt;bot&gt; blabla bla bla <br>&lt;bot&gt; rarara<br><br>so everyting before "-example" will be announced on the first line and everyting after "-example" will be announced on the second line<br><br>I search true this forum and the only thing i could find that is almost the same as i am looking for was <a href="http://forum.egghelp.org/viewtopic.php?t=12042&amp;highlight=regexp" class="postlink">http://forum.egghelp.org/viewtopic.php? ... ght=regexp</a><br><br>Now i am really a noob, so laugh and make fun of me, but i tried:<br><div class="codebox"><p>Code: </p><pre><code>set one $textset two $textregsub -all -- $one "-example*" one ""regsub -all -- $two "*-example" two ""</code></pre></div>But ofcourse that didnt worked  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><br>So who can help me<br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8399">pipo</a> — Tue May 01, 2007 5:29 am</p><hr />
]]></content>
	</entry>
	</feed>
