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

	<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>2008-05-21T18:01:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-05-21T18:01:17-04:00</updated>

		<published>2008-05-21T18:01:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83074#p83074</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83074#p83074"/>
		<title type="html"><![CDATA[return 0 by number]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83074#p83074"><![CDATA[
<blockquote class="uncited"><div>or do:<div class="codebox"><p>Code: </p><pre><code>if {[regexp {[1-9]|\.} $text]} { return 0 }</code></pre></div></div></blockquote>You forgot the 0, it can also be done like this using regexp:<div class="codebox"><p>Code: </p><pre><code>regexp {[0-9.]} $text</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed May 21, 2008 6:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2008-05-21T16:08:26-04:00</updated>

		<published>2008-05-21T16:08:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83073#p83073</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83073#p83073"/>
		<title type="html"><![CDATA[return 0 by number]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83073#p83073"><![CDATA[
or do:<div class="codebox"><p>Code: </p><pre><code>if {[regexp {[1-9]|\.} $text]} { return 0 }</code></pre></div>difference being that in Sir_Fz example you get the return 1 when no match is made. Of course you can just toss the string match into an if statement as I have done and get the desired result. Just wanted to show it done with regexp<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Wed May 21, 2008 4:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-05-21T15:27:26-04:00</updated>

		<published>2008-05-21T15:27:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83068#p83068</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83068#p83068"/>
		<title type="html"><![CDATA[return 0 by number]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83068#p83068"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>return [expr {![string match {*[0-9.]*} $text]}]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed May 21, 2008 3:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pinkel]]></name></author>
		<updated>2008-05-21T15:03:21-04:00</updated>

		<published>2008-05-21T15:03:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83065#p83065</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83065#p83065"/>
		<title type="html"><![CDATA[return 0 by number]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83065#p83065"><![CDATA[
I am looking for the code that will return 0, if the $text contains one or more of the numbers: 1234567890 and/or a . (dot)<br><br>tnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9942">pinkel</a> — Wed May 21, 2008 3:03 pm</p><hr />
]]></content>
	</entry>
	</feed>
