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

	<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>2003-09-04T03:38:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-04T03:38:38-04:00</updated>

		<published>2003-09-04T03:38:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26451#p26451</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26451#p26451"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26451#p26451"><![CDATA[
<a href="http://tcl.tk//man/tcl8.3/TclCmd/string.htm#M35" class="postlink">http://tcl.tk//man/tcl8.3/TclCmd/string.htm#M35</a><br>vs<br><a href="http://tcl.tk//man/tcl8.3/TclCmd/re_syntax.htm" class="postlink">http://tcl.tk//man/tcl8.3/TclCmd/re_syntax.htm</a> + <a href="http://tcl.tk//man/tcl8.3/TclCmd/regexp.htm" class="postlink">http://tcl.tk//man/tcl8.3/TclCmd/regexp.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Sep 04, 2003 3:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-09-04T03:32:20-04:00</updated>

		<published>2003-09-04T03:32:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26450#p26450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26450#p26450"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26450#p26450"><![CDATA[
which manual ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Sep 04, 2003 3:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-04T02:58:35-04:00</updated>

		<published>2003-09-04T02:58:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26442#p26442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26442#p26442"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26442#p26442"><![CDATA[
<blockquote class="uncited"><div>ok, do these two examples (regexp and string) do exactly the same thing ? like I can convert any regexp to a string on the same concept ?</div></blockquote>No. Use {^[0-9]} in the regexp to match the same thing as {[0-9]*} using string match.<br><br>Most regexp rules CAN'T be translated into string match masks, but when they can and become alot more efficient, they should be IMO. (Read the manual to find out what you can and can't)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Sep 04, 2003 2:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-09-04T02:52:09-04:00</updated>

		<published>2003-09-04T02:52:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26440#p26440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26440#p26440"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26440#p26440"><![CDATA[
<blockquote class="uncited"><div>regexp SUCKS <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> (so slow compared to most string commands that perform such tasks...it's only needed for really complex patterns that would require lots of other commands)<br><br>Here's an example (matching a number as the first char in a string):<blockquote class="uncited"><div>% set a 0abcdefghijklmnopqrstuvwxyz<br>0abcdefghijklmnopqrstuvwxyz<br>% time [list regexp {[0-9]+.*} $a] 100000<br>10 microseconds per iteration<br>% time [list string match {[0-9]*} $a] 100000<br>2 microseconds per iteration</div></blockquote></div></blockquote>ok, do these two examples (regexp and string) do exactly the same thing ?<br>like I can convert any regexp to a string on the same concept ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Sep 04, 2003 2:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T19:57:49-04:00</updated>

		<published>2003-09-03T19:57:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26412#p26412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26412#p26412"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26412#p26412"><![CDATA[
<blockquote class="uncited"><div>For the record, it might help a little bit if you used the correct regexp <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"></div></blockquote>Yeah <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> (It wouldn't matter much to the speed difference though)<br><blockquote class="uncited"><div>Also, I can not stress enough the importance of writing compatible code for various TCL versions, and Eggdrop versions... While string match is faster, it does not support regular expression matching in all TCL versions.  Keeping this in perspective, 5-6 MICROseconds are inconsequential, for the price of retaining backwards compatibility.<br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>What do you mean? You're coding for some version &lt; <a href="http://tcl.tk/man/tcl7.5/TclCmd/string.n.html#M10" class="postlink">7.5</a>?<br>And for the record, microseconds matter when you execute stuff millions of times <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=2878">user</a> — Wed Sep 03, 2003 7:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2003-09-03T19:50:30-04:00</updated>

		<published>2003-09-03T19:50:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26410#p26410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26410#p26410"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26410#p26410"><![CDATA[
<blockquote class="uncited"><div>regexp SUCKS <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> (so slow compared to most string commands that perform such tasks...it's only needed for really complex patterns that would require lots of other commands)<br><br>Here's an example (matching a number as the first char in a string):<blockquote class="uncited"><div>% set a 0abcdefghijklmnopqrstuvwxyz<br>0abcdefghijklmnopqrstuvwxyz<br>% time [list regexp {[0-9]+.*} $a] 100000<br>10 microseconds per iteration<br>% time [list string match {[0-9]*} $a] 100000<br>2 microseconds per iteration</div></blockquote></div></blockquote>For the record, it might help a little bit if you used the correct regexp <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><div class="codebox"><p>Code: </p><pre><code>regexp {^[0-9]} $a</code></pre></div>Instead of having it search the string anywhere for a number ;x<br><br>Also, I can not stress enough the importance of writing compatible code for various TCL versions, and Eggdrop versions... While string match is faster, it does not support regular expression matching in all TCL versions.  Keeping this in perspective, 5-6 MICROseconds are inconsequential, for the price of retaining backwards compatibility.<br> <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=2005">strikelight</a> — Wed Sep 03, 2003 7:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-09-03T17:44:58-04:00</updated>

		<published>2003-09-03T17:44:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26404#p26404</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26404#p26404"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26404#p26404"><![CDATA[
thanks  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cool.gif" width="15" height="15" alt="8)" title="Cool"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Wed Sep 03, 2003 5:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T17:38:02-04:00</updated>

		<published>2003-09-03T17:38:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26403#p26403</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26403#p26403"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26403#p26403"><![CDATA[
replace "first" with "0" and use 'string index $word 0' to fetch the single char...no need to use range to fetch something that aint a range <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=2878">user</a> — Wed Sep 03, 2003 5:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-09-03T17:22:06-04:00</updated>

		<published>2003-09-03T17:22:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26402#p26402</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26402#p26402"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26402#p26402"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set word "eggdrop" proc get:stuff { stuff } {   global word  set first3letters [string range $word first 2]  # returns egg  set firstletter [string range $word first 0]  # returns e  if {[regexp {[0-9]} $firstletter]} {return "letter is a number silly"}} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Wed Sep 03, 2003 5:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T17:15:03-04:00</updated>

		<published>2003-09-03T17:15:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26400#p26400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26400#p26400"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26400#p26400"><![CDATA[
<blockquote class="uncited"><div>i saw nothing pertaning to a single word,<br>what examples i did see pertained to<br>a sentence on ALL of the commands</div></blockquote>What do you mean? The string commands work with what you feed them...in general a string of chars...there are no words <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br><blockquote class="uncited"><div>why would the paramaters be different <br>for string range than string trimright?</div></blockquote>string trimright doesn't deal with indexes, it trims of the chars specified (read the manual)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Sep 03, 2003 5:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-09-03T17:11:11-04:00</updated>

		<published>2003-09-03T17:11:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26399#p26399</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26399#p26399"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26399#p26399"><![CDATA[
i saw nothing pertaning to a single word,<br>what examples i did see pertained to<br>a sentence on ALL of the commands<br><br>why would the paramaters be different <br>for string range than string trimright?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Wed Sep 03, 2003 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T17:13:25-04:00</updated>

		<published>2003-09-03T17:09:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26398#p26398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26398#p26398"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26398#p26398"><![CDATA[
regexp SUCKS <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> (so slow compared to most string commands that perform such tasks...it's only needed for really complex patterns that would require lots of other commands)<br><br>Here's an example (matching a number as the first char in a string):<blockquote class="uncited"><div>% set a 0abcdefghijklmnopqrstuvwxyz<br>0abcdefghijklmnopqrstuvwxyz<br>% time [list regexp {[0-9]+.*} $a] 100000<br>10 microseconds per iteration<br>% time [list string match {[0-9]*} $a] 100000<br>2 microseconds per iteration</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Sep 03, 2003 5:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-09-03T17:05:09-04:00</updated>

		<published>2003-09-03T17:05:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26396#p26396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26396#p26396"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26396#p26396"><![CDATA[
most networks do not allow the first letter to be a number.<br><br>if on yours' its allowed then regexp would be the best solution.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Sep 03, 2003 5:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-09-03T17:07:09-04:00</updated>

		<published>2003-09-03T17:04:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26395#p26395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26395#p26395"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26395#p26395"><![CDATA[
'string trim' doesn't do what you said in your comments. I recommend reading the entire '<a href="http://tcl.tk/man/tcl8.3/TclCmd/string.htm" class="postlink">string</a>' manual page <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Check out: string is, string index, string range, string match<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Sep 03, 2003 5:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-09-03T17:00:47-04:00</updated>

		<published>2003-09-03T17:00:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=26394#p26394</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=26394#p26394"/>
		<title type="html"><![CDATA[need help creating an autovoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=26394#p26394"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set word "eggdrop" proc get:first:3letters { stuff } {   global word   set first3letters [string trimright $word 2]  # returns egg  set firstletter [string trimright $word 0]  # returns e  also, how can i check to see if $firstletter is a number?  is there a command, or do you "have" to use regexp} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Wed Sep 03, 2003 5:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
