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

	<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>2005-12-04T07:43:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[gonzo]]></name></author>
		<updated>2005-12-04T07:43:44-04:00</updated>

		<published>2005-12-04T07:43:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57937#p57937</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57937#p57937"/>
		<title type="html"><![CDATA[split 1 string to &quot;many&quot; strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57937#p57937"><![CDATA[
thx demond!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7063">gonzo</a> — Sun Dec 04, 2005 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-12-03T15:58:47-04:00</updated>

		<published>2005-12-03T15:58:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57929#p57929</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57929#p57929"/>
		<title type="html"><![CDATA[split 1 string to &quot;many&quot; strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57929#p57929"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>foreach {foo word} [regexp -all -inline {{(.*?)}} $text] {lappend x $word}</code></pre></div>then in <em class="text-italics">x</em> you have a list of the strings you need<br><br>or you can strip braces from each word (but this won't work if you lack spaces):<div class="codebox"><p>Code: </p><pre><code>foreach word [split $text] {lappend x [string trim $word {{}}]}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Dec 03, 2005 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gonzo]]></name></author>
		<updated>2005-12-03T14:18:22-04:00</updated>

		<published>2005-12-03T14:18:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57926#p57926</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57926#p57926"/>
		<title type="html"><![CDATA[split 1 string to &quot;many&quot; strings]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57926#p57926"><![CDATA[
First of all: i only did very little tcl programming so far and couldn't find a solution to my problem in the forum and the tcl FAQ...<br><br>problem:<br>i have one string which looks like <br><em class="text-italics">{some numbers} {text1} {text2} {text3} {text4}</em><br><br>and i want every "information" between { } as a seperate string:<br>a = "some numbers"<br>b = "text1"....<br><br>i played around with <em class="text-italics">string last/first</em> and <em class="text-italics">string range</em>, but was only able to get the first ("some numbers") and the last ("text4") part.<br><br><br>bonus question <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>how do i extract the first word of text4 only?<br><br>thanx for your help!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7063">gonzo</a> — Sat Dec 03, 2005 2:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
