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

	<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>2007-06-11T02:15:31-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-06-11T02:15:31-04:00</updated>

		<published>2007-06-11T02:15:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73409#p73409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73409#p73409"/>
		<title type="html"><![CDATA[Best way to match using regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73409#p73409"><![CDATA[
Exactly, Sir_Fz is right. This only matches cellphone providers in Malaysia. They have a 3 digit operator code following a 7 digit individual number. The fixed line numbers are however different.<br><br>Here is what I use now:<br><div class="codebox"><p>Code: </p><pre><code>if {[regexp {\x20(01[234679]-?[0-9]{7})\x20} $text]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Jun 11, 2007 2:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-06-07T14:37:29-04:00</updated>

		<published>2007-06-07T14:37:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73323#p73323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73323#p73323"/>
		<title type="html"><![CDATA[Best way to match using regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73323#p73323"><![CDATA[
Phone numbers differ from one country to another. For example, here in Lebanon a phone number is made up of 6 numbers, and our area code is made up of 2 numbers so it's +961-xx-xxxxxx.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Jun 07, 2007 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2007-06-07T06:05:39-04:00</updated>

		<published>2007-06-07T06:05:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73319#p73319</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73319#p73319"/>
		<title type="html"><![CDATA[Best way to match using regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73319#p73319"><![CDATA[
thats strange, my cell phone number consists of 8 digits and has a 4 digit prefix number even without the country code. Is it supposed to match only local cellphone numbers?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Jun 07, 2007 6:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-06-06T03:42:57-04:00</updated>

		<published>2007-06-06T03:42:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73297#p73297</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73297#p73297"/>
		<title type="html"><![CDATA[Best way to match using regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73297#p73297"><![CDATA[
Thanks Sir_Fz that is exactly what I needed! Actually the "$" in the end did the trick, hehe  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Wed Jun 06, 2007 3:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-06-05T05:39:20-04:00</updated>

		<published>2007-06-05T05:39:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73282#p73282</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73282#p73282"/>
		<title type="html"><![CDATA[Best way to match using regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73282#p73282"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>regexp {^01[234679]-?[0-9]{7}$} $number</code></pre></div>So the number must start with a number (0) and end with a number (exactly 7 numbers after the operator).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Jun 05, 2007 5:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-06-05T00:51:33-04:00</updated>

		<published>2007-06-05T00:51:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73281#p73281</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73281#p73281"/>
		<title type="html"><![CDATA[Best way to match using regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73281#p73281"><![CDATA[
I came up with this recently:<br><div class="codebox"><p>Code: </p><pre><code>if {[regexp -nocase {012-?[0-9]{7}[^A-Z0-9+&amp;@#/%?=~_|!:,.;]|013-?[0-9]{7}[^A-Z0-9+&amp;@#/%?=~_|!:,.;]|014-?[0-9]{7}[^A-Z0-9+&amp;@#/%?=~_|!:,.;]|016-?[0-9]{7}[^A-Z0-9+&amp;@#/%?=~_|!:,.;]|017-?[0-9]{7}[^A-Z0-9+&amp;@#/%?=~_|!:,.;]|019-?[0-9]{7}[^A-Z0-9+&amp;@#/%?=~_|!:,.;]} $text]} {</code></pre></div>The code looks blotty right. Okay the main idea behind this is to match cell phone numbers.<br><br>The cell operator numbers are: 012, 013, 014... and so on as you can see.<br>Then there is a 7 digit phone number after the cell operator number.<br>After the last digit (7th digit) of the phone number there shouldn't be any number.<br><br>The number can be like:<br>0126708090<br><br>or even like:<br>012-6708090<br><br>This piece of code looks very long and blotty to me, although it works. Any suggestions for improvement?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Jun 05, 2007 12:51 am</p><hr />
]]></content>
	</entry>
	</feed>
