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

	<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>2004-07-25T13:18:13-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-07-25T13:18:13-04:00</updated>

		<published>2004-07-25T13:18:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39066#p39066</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39066#p39066"/>
		<title type="html"><![CDATA[Problem with string match.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39066#p39066"><![CDATA[
Yeah, thanks I am familiar with the last paragraph.<br>I myself, use { } braces when using regexp or regsub.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Jul 25, 2004 1:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DayCuts]]></name></author>
		<updated>2004-07-24T17:52:15-04:00</updated>

		<published>2004-07-24T17:52:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39041#p39041</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39041#p39041"/>
		<title type="html"><![CDATA[Problem with string match.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39041#p39041"><![CDATA[
Because special charactors such as [ and ] have different meanings in refular expression.  Also i tend to put any regular expression inside {} brackets to avoid any clashes with tcl interpretations of anything.<br><br>[]'s in general tcl code are treated as a command.  a \ before a special charactor (such as those []'s) is an 'escape'.  Basically tells the tcl engine to treat the proceeding charactor as plain text and not interpret it as a special charactor like it normally would.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5073">DayCuts</a> — Sat Jul 24, 2004 5:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-07-24T14:40:12-04:00</updated>

		<published>2004-07-24T14:40:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39037#p39037</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39037#p39037"/>
		<title type="html"><![CDATA[Problem with string match.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39037#p39037"><![CDATA[
Ah thanks alot gb.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br>I am not sure why it didnt work without the \'s.<br><br>Because with regexp, regsub you can use [0-9] or [A-Z] directly.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br>My mistake I guess.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jul 24, 2004 2:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2004-07-24T10:37:06-04:00</updated>

		<published>2004-07-24T10:37:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39032#p39032</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39032#p39032"/>
		<title type="html"><![CDATA[Problem with string match.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39032#p39032"><![CDATA[
Just escape the brackets and it should work<div class="codebox"><p>Code: </p><pre><code>string match *\[0-9\]* $banlistremove</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Sat Jul 24, 2004 10:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-07-24T03:39:22-04:00</updated>

		<published>2004-07-24T03:39:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=39019#p39019</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=39019#p39019"/>
		<title type="html"><![CDATA[Problem with string match.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=39019#p39019"><![CDATA[
Hi,<br><br>I have this small piece of code, I am trying to detect if a variable $banlistremove has any number, from like the 0 to 9 range, 0, 1, 2, 3......, 9, 0 in it, or not.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><div class="codebox"><p>Code: </p><pre><code>  if {(([string match *[0-9]* $banlistremove]) || ([string match *[0-9][0-9]* $banlistremove])) &amp;&amp; (![string equal -nocase $banlistremove "all"])} { banlist:clean:specific $chan }</code></pre></div>But it, gives me an error.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"> <br><div class="codebox"><p>Code: </p><pre><code>[03:35] Tcl error [banlist:type]: invalid command name "0-9"</code></pre></div>I have also tried "*[0-9]*", with quotations, but doesn't work.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br>What could be the reason?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jul 24, 2004 3:39 am</p><hr />
]]></content>
	</entry>
	</feed>
