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

	<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-10-30T22:50:05-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-10-30T22:50:05-04:00</updated>

		<published>2005-10-30T22:50:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56922#p56922</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56922#p56922"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56922#p56922"><![CDATA[
<blockquote class="uncited"><div>well that's what i was looking at too, but i think ive goofed up somewhere else int he script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"> could it be possibly this bit since it was mentioned earlier as being incorrect <div class="codebox"><p>Code: </p><pre><code>  set text [lindex [split $text " "] 0]</code></pre></div></div></blockquote>this line is the reason for your "one word" problem.<br>btw... after that line $text is a string again. drop that lindex thing. oh, btw. if you want to elimiate multiple white spaces... this wont be enough <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">. that might be the first time you could consider using regsub <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<br>ex.: regsub -all {\s+} $text { } text<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Oct 30, 2005 10:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T22:06:55-04:00</updated>

		<published>2005-10-30T22:06:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56921#p56921</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56921#p56921"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56921#p56921"><![CDATA[
and the corrected line for relay is:<div class="codebox"><p>Code: </p><pre><code>    putserv "PRIVMSG &lt;chan&gt; : \037Text:\037 [string map {. \\. : \\: / \\/ exe \exe$ * \\* bat \bat$ jpg \jpg$ mpg \mpg$} [string range $text 0 end] ]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 10:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T22:05:25-04:00</updated>

		<published>2005-10-30T22:05:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56920#p56920</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56920#p56920"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56920#p56920"><![CDATA[
well that's what i was looking at too, but i think ive goofed up somewhere else int he script <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"> could it be possibly this bit since it was mentioned earlier as being incorrect <div class="codebox"><p>Code: </p><pre><code>  set text [lindex [split $text " "] 0]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 10:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-10-30T20:11:46-04:00</updated>

		<published>2005-10-30T20:11:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56919#p56919</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56919#p56919"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56919#p56919"><![CDATA[
<blockquote class="uncited"><div>... i thought parhaps [string wordstart $text wordend ] ...</div></blockquote>You mean:<div class="codebox"><p>Code: </p><pre><code>string range $text 0 end</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Oct 30, 2005 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T18:25:44-04:00</updated>

		<published>2005-10-30T18:25:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56917#p56917</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56917#p56917"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56917#p56917"><![CDATA[
<blockquote class="uncited"><div>do you want to strip leading and trailing spaces?!<br>then you should have scrolled down the string manual some more, string trim will delete them.<br>just: [string trim $text]<br><br>PS: dont use list commands on strings. list commands are intented to be used with proper lists only (made by split, list or lappend).</div></blockquote>Yep thats ok, but still only outs puts the first word in the relay :/ i thought parhaps [string wordstart $text wordend ] might do it but alas still only one word and a fair few hundred rehases trying to rack my braina round it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 6:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-10-30T17:31:16-04:00</updated>

		<published>2005-10-30T17:31:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56915#p56915</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56915#p56915"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56915#p56915"><![CDATA[
do you want to strip leading and trailing spaces?!<br>then you should have scrolled down the string manual some more, string trim will delete them.<br>just: [string trim $text]<br><br>PS: dont use list commands on strings. list commands are intented to be used with proper lists only (made by split, list or lappend).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Oct 30, 2005 5:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T15:38:51-04:00</updated>

		<published>2005-10-30T15:38:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56914#p56914</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56914#p56914"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56914#p56914"><![CDATA[
Ok i have one more tiny issue, ive got everything working perfect till a space comes into play so far i have :<div class="codebox"><p>Code: </p><pre><code>    putserv "PRIVMSG #channel :  [string map {. \\. : \\: / \\/ exe \exe$ * \\* bat \bat$ jpg \jpg$ mpg \mpg$}  $text]"</code></pre></div>which works fine till a space comes into it so then it only echoes the first char, normally without replacement i would use <div class="codebox"><p>Code: </p><pre><code>[lrange $text 0 end]</code></pre></div>to echo the entire sentance, sadly this doesnt work and still picks up the first char <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> any ideas ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 3:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T13:16:55-04:00</updated>

		<published>2005-10-30T13:16:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56913#p56913</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56913#p56913"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56913#p56913"><![CDATA[
Thank you, works perfectly now. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 1:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T12:23:43-04:00</updated>

		<published>2005-10-30T12:23:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56912#p56912</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56912#p56912"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56912#p56912"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>would you mind giving an example on usage ? as i say its new to me :/ dont want to screw it up</div></blockquote>open up your eyes, I gave you an example <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">. Be more detailed to get a more detailed example <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">.<div class="codebox"><p>Code: </p><pre><code>% string map {. \\.} "goto irc.somewhere.net"goto irc\.somewhere\.net</code></pre></div>You can try it on your own tcl shell if you dont trust me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">. Just a little note, when you use "" instead of {} you will need to use ". \\\\." <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">.</div></blockquote>lol thank you and aplogies :/ <br><br>appreciated i'll have a play now.<br><br>and no not that i dont trust you or anything like that at all more a case of its very new to me and im not exactly the greatest scripter going as is, so do just need longer to run these things thru my brain.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 12:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-10-30T12:15:35-04:00</updated>

		<published>2005-10-30T12:15:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56911#p56911</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56911#p56911"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56911#p56911"><![CDATA[
<blockquote class="uncited"><div>would you mind giving an example on usage ? as i say its new to me :/ dont want to screw it up</div></blockquote>open up your eyes, I gave you an example <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">. Be more detailed to get a more detailed example <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">.<div class="codebox"><p>Code: </p><pre><code>% string map {. \\.} "goto irc.somewhere.net"goto irc\.somewhere\.net</code></pre></div>You can try it on your own tcl shell if you dont trust me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">. Just a little note, when you use "" instead of {} you will need to use ". \\\\." <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Oct 30, 2005 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T12:14:09-04:00</updated>

		<published>2005-10-30T12:14:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56910#p56910</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56910#p56910"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56910#p56910"><![CDATA[
<blockquote class="uncited"><div>what about <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/string.htm#M34" class="postlink">string map</a>?<br>[string map {. \\.} $string]<br>should be just fine</div></blockquote>would you mind giving an example on usage ? as i say its new to me :/ dont want to screw it up<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 12:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-10-30T12:11:08-04:00</updated>

		<published>2005-10-30T12:11:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56909#p56909</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56909#p56909"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56909#p56909"><![CDATA[
what about <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/string.htm#M34" class="postlink">string map</a>?<br>[string map {. \\.} $string]<br>should be just fine<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Oct 30, 2005 12:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T11:46:21-04:00</updated>

		<published>2005-10-30T11:46:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56908#p56908</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56908#p56908"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56908#p56908"><![CDATA[
<blockquote class="uncited"><div>How is an output supposed to become a regex? Either a string is an regular expression, or it just a string.</div></blockquote>well its just url conversion so im guessing just a string im very unfamiliar with regex to be honest ( working on that tho ) an example output would be <br><br>Channel A relays goto irc.somewhere.net<br>Channel B outputs goto irc\.somwehere\.net<br><br>least i think thats right again im still reading up on regex :/<br><br>from my knowledge it needs to work the same way unrealircd's does<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 11:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-10-30T11:26:13-04:00</updated>

		<published>2005-10-30T11:26:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56907#p56907</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56907#p56907"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56907#p56907"><![CDATA[
How is an output supposed to become a regex? Either a string is an regular expression, or it just a string.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Oct 30, 2005 11:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[X-Ception]]></name></author>
		<updated>2005-10-30T11:20:37-04:00</updated>

		<published>2005-10-30T11:20:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56906#p56906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56906#p56906"/>
		<title type="html"><![CDATA[Regex output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56906#p56906"><![CDATA[
Hi, <br>i have a script pre made that relays information from one channel to another, but i require the outputted information to be pre regex formatted. So that its put in normal at channel A and the output in channel B is regex. <br><br>anyone got any ideas ? been looking for a while cant seem to get it right <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6247">X-Ception</a> — Sun Oct 30, 2005 11:20 am</p><hr />
]]></content>
	</entry>
	</feed>
