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

	<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-01-18T18:52:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-18T18:52:16-04:00</updated>

		<published>2005-01-18T18:52:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45524#p45524</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45524#p45524"/>
		<title type="html"><![CDATA[help with correct regexp syntax needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45524#p45524"><![CDATA[
ic indeed 0 is included by length.. well this should work <div class="codebox"><p>Code: </p><pre><code>proc isNumber {num} {  return [regexp {^[1-9]{1}[0-9]{3,4}$} $num]}</code></pre></div>hmm indeed just as you told hehe<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Jan 18, 2005 6:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-18T13:38:50-04:00</updated>

		<published>2005-01-18T13:38:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45512#p45512</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45512#p45512"/>
		<title type="html"><![CDATA[why did you post that?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45512#p45512"><![CDATA[
He said 1000-99999, not 0000(aka 0)-99999, and he's already using the sequence quantifier ({})<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Jan 18, 2005 1:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-01-18T12:59:58-04:00</updated>

		<published>2005-01-18T12:59:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45511#p45511</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45511#p45511"/>
		<title type="html"><![CDATA[help with correct regexp syntax needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45511#p45511"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc isNumber {num} {  if {[regexp {^[0-9]{4,5}$} $num]} {    return 1  }  return 0}</code></pre></div>this should take care of it cause of the {} it sets a minimum length and numbers with minimum lenght of 4 start from 1000 maximumlength of 5 is 99999 exactly the range you require so..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue Jan 18, 2005 12:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-18T12:39:59-04:00</updated>

		<published>2005-01-18T12:39:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45510#p45510</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45510#p45510"/>
		<title type="html"><![CDATA[Re: help with correct regexp syntax needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45510#p45510"><![CDATA[
add a ^ to the start of your expression and a $ to the end<br><br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/re_syntax.htm#M23" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/re_syntax.htm#M23</a><br><a href="http://www.tcl.tk/man/tcl8.5/TclCmd/re_syntax.htm#M24" class="postlink">http://www.tcl.tk/man/tcl8.5/TclCmd/re_syntax.htm#M24</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Jan 18, 2005 12:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2005-01-18T11:35:30-04:00</updated>

		<published>2005-01-18T11:35:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45508#p45508</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45508#p45508"/>
		<title type="html"><![CDATA[help with correct regexp syntax needed]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45508#p45508"><![CDATA[
Attempting regexp for the first time but I can't seem to get the syntax correct.<br><br>I want to test if a string is between 1000 and 99999 (I know there are simpler methods than regexp to do this by the way)<br><br># testing script<br># format !test &lt;argument&gt;<br><br>bind pub - !test ptest<br><br>proc ptest {nick uhost hand chan arg} {<br>  if {[regexp \[1-9\]\[0-9\]{3,4} $arg]} {<br>    putserv "PRIVMSG $chan :Regular expression matched"<br>  } else {<br>    putserv "PRIVMSG $chan :Regular expression not matched"<br>  } <br>}<br><br>!test 1024 yields 'Regular expression matched' &lt;--- correct<br>!test hello yields 'Regular expression not matched' &lt;--- correct<br>!test 675 yields 'Regular expression not matched' &lt;--- correct<br>!test 657349 yields 'Regular expression matched' &lt;--- UNEXPECTED<br><br>Where am I going wrong please<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Tue Jan 18, 2005 11:35 am</p><hr />
]]></content>
	</entry>
	</feed>
