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

	<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-12-22T13:07:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-12-22T13:07:01-04:00</updated>

		<published>2005-12-22T13:07:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58588#p58588</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58588#p58588"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58588#p58588"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>regsub -all -- {^3|&lt;(/?)[A-z]{1,}&gt;} $string "" string# remove the extra spacesset string [join $string]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Dec 22, 2005 1:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-12-22T06:42:14-04:00</updated>

		<published>2005-12-22T06:42:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58580#p58580</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58580#p58580"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58580#p58580"><![CDATA[
ok now that that works (there was a space at the beginning of the text line that was giving me problems)...it only outputs the lines of text that are defined by the regexp<br><div class="codebox"><p>Code: </p><pre><code>if {[regexp {^\x020[3]} $e] == 1} {</code></pre></div>now i need to work on getting the format correct<br><br>id like to take this:<br><div class="codebox"><p>Code: </p><pre><code>3&lt;left&gt;501 NEW JERSEY      &lt;right&gt; 96&lt;br&gt;&lt;left&gt;502 ORLANDO         &lt;right&gt; 85&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt;</code></pre></div>and end up with this<br><div class="codebox"><p>Code: </p><pre><code>NEW JERSEY 96 ORLANDO 85 FINAL</code></pre></div>im pretty sure this is way over my head now, so feel free to help out <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Thu Dec 22, 2005 6:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-12-22T03:58:30-04:00</updated>

		<published>2005-12-22T03:58:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58575#p58575</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58575#p58575"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58575#p58575"><![CDATA[
im not sure if im going in the right direction with this, but ive managed to code something that gives me 0 output, but no errors.<br><div class="codebox"><p>Code: </p><pre><code>   foreach e [split [::http::data $x] \n] {     if {[regexp {^3} $e] == 1} {       puthelp "privmsg $c :$e"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Thu Dec 22, 2005 3:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-12-22T02:19:03-04:00</updated>

		<published>2005-12-22T02:19:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58571#p58571</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58571#p58571"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58571#p58571"><![CDATA[
the lines that im wanting to strip out of the text file look like this<br><div class="codebox"><p>Code: </p><pre><code> 3&lt;left&gt;501 NEW JERSEY      &lt;right&gt; 96&lt;br&gt;&lt;left&gt;502 ORLANDO         &lt;right&gt; 85&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;503 LA CLIPPERS     &lt;right&gt; 75&lt;br&gt;&lt;left&gt;504 INDIANA         &lt;right&gt; 97&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;505 GOLDEN STATE    &lt;right&gt;100&lt;br&gt;&lt;left&gt;506 PHILADELPHIA    &lt;right&gt;111&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;507 SAN ANTONIO     &lt;right&gt;107&lt;br&gt;&lt;left&gt;508 NEW YORK        &lt;right&gt; 96&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;509 UTAH            &lt;right&gt; 89&lt;br&gt;&lt;left&gt;510 BOSTON          &lt;right&gt;101&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;511 NEW ORLEANS     &lt;right&gt; 69&lt;br&gt;&lt;left&gt;512 MINNESOTA       &lt;right&gt; 88&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;513 PORTLAND        &lt;right&gt; 79&lt;br&gt;&lt;left&gt;514 MEMPHIS         &lt;right&gt; 89&lt;br&gt;&lt;center&gt;&lt;h&gt;      FINAL&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;515 TORONTO         &lt;right&gt; 80&lt;br&gt;&lt;left&gt;516 HOUSTON         &lt;right&gt; 67&lt;br&gt;&lt;center&gt;&lt;h&gt;08:25 4th Q&lt;/h&gt;&lt;br&gt;&lt;br&gt; 3&lt;left&gt;517 WASHINGTON      &lt;right&gt; 74&lt;br&gt;&lt;left&gt;518 DENVER          &lt;right&gt; 70&lt;br&gt;&lt;center&gt;&lt;h&gt;04:17 3rd Q&lt;/h&gt;&lt;br&gt;&lt;br&gt;</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Thu Dec 22, 2005 2:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-12-22T02:13:57-04:00</updated>

		<published>2005-12-22T02:13:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58568#p58568</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58568#p58568"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58568#p58568"><![CDATA[
ok, ill start looking into that, but from reading in the forums, if i want to parse html, im going to need to use regexp anyways correct?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Thu Dec 22, 2005 2:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2005-12-22T02:11:18-04:00</updated>

		<published>2005-12-22T02:11:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58567#p58567</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58567#p58567"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58567#p58567"><![CDATA[
You don't really need regexp for that, check the <a href="http://tmml.sourceforge.net/doc/tcl/string.html" class="postlink">string</a> manual, and place that before the "puthelp "privmsg $c :$e"" line in a if statement.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Dec 22, 2005 2:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2005-12-22T01:23:58-04:00</updated>

		<published>2005-12-22T01:23:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=58566#p58566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=58566#p58566"/>
		<title type="html"><![CDATA[filter text with regexp]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=58566#p58566"><![CDATA[
i need to add a regexp to this to filter out the text file and only output lines that begin with the number 3...and im really at a loss at how to integrate that in with my current script.<br><div class="codebox"><p>Code: </p><pre><code>proc text {n u h c t} {   set x [::http::geturl http://www.website.com/example.txt]   foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}   ::http::cleanup $x}</code></pre></div>any help would be greatly appreciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6497">johne</a> — Thu Dec 22, 2005 1:23 am</p><hr />
]]></content>
	</entry>
	</feed>
