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

	<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>2014-07-26T15:17:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2014-07-26T15:17:07-04:00</updated>

		<published>2014-07-26T15:17:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103062#p103062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103062#p103062"/>
		<title type="html"><![CDATA[Numeric wild card]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103062#p103062"><![CDATA[
There is no # wild card for [string match], you will have to do it another way.<br><br>Fairly sure you should use a regexp or 2 here, but this one is easy enough to fix as string match...<div class="codebox"><p>Code: </p><pre><code>|| [string match -nocase "test?" $txt] || [string match -nocase "test??" $txt] &amp;&amp;</code></pre></div>would be...<div class="codebox"><p>Code: </p><pre><code>|| [string match -nocase {test[0-9]} $txt] || [string match -nocase {test[0-9][0-9]} $txt] &amp;&amp;</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Jul 26, 2014 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daigo]]></name></author>
		<updated>2014-07-26T14:45:20-04:00</updated>

		<published>2014-07-26T14:45:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103061#p103061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103061#p103061"/>
		<title type="html"><![CDATA[Numeric wild card]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103061#p103061"><![CDATA[
My script is this:<br><div class="codebox"><p>Code: </p><pre><code>bind pubm - * testproc test {nick host hand chan txt} {  set txt [string tolower $txt]  if {[string match -nocase "test" $txt] || [string match -nocase "test?" $txt] || [string match -nocase "test??" $txt] &amp;&amp; $nick eq "daigo"} {  set testing [join [lrange [split $txt] 0 end]]  puthelp "PRIVMSG $chan :$testing"  } return 0}</code></pre></div>Where I put the ? wild cards, I only want them to be numbers<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12410">daigo</a> — Sat Jul 26, 2014 2:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Get_A_Fix]]></name></author>
		<updated>2014-07-26T14:10:39-04:00</updated>

		<published>2014-07-26T14:10:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103060#p103060</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103060#p103060"/>
		<title type="html"><![CDATA[Numeric wild card]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103060#p103060"><![CDATA[
Something like<br><div class="codebox"><p>Code: </p><pre><code>proc isnum {string} {  if {[regexp {^-?\d+(\.\d+)?$} $string]} {    return 1;  }  return 0;}</code></pre></div>then you are able to make if statements, like..<br><div class="codebox"><p>Code: </p><pre><code>if {![isnum $arg]} {puthelp "PRIVMSG $chan :You did not type a number"; return}if {[isnum $arg]} {puthelp "PRIVMSG $chan :You did type a number"; return}</code></pre></div>for more wildcarding, you'd use a string match.<br><div class="codebox"><p>Code: </p><pre><code>if {[isnum $arg] &amp;&amp; [string match -nocase "*something*" $arg]} {  do this}</code></pre></div>Hope that helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6204">Get_A_Fix</a> — Sat Jul 26, 2014 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daigo]]></name></author>
		<updated>2014-07-26T13:56:30-04:00</updated>

		<published>2014-07-26T13:56:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103058#p103058</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103058#p103058"/>
		<title type="html"><![CDATA[Numeric wild card]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103058#p103058"><![CDATA[
I want a wild card to be restricted to numbers only. How do I make the * and/or ? wildcards to be only numerical?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12410">daigo</a> — Sat Jul 26, 2014 1:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
