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

	<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-03-18T07:44:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CuteBangla]]></name></author>
		<updated>2007-03-18T07:44:20-04:00</updated>

		<published>2007-03-18T07:44:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71345#p71345</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71345#p71345"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71345#p71345"><![CDATA[
<blockquote class="uncited"><div>Thanks alot <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I am done with the pipes atleast <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"></div></blockquote>will you share the working script with us plz<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7425">CuteBangla</a> — Sun Mar 18, 2007 7:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-03-17T08:36:19-04:00</updated>

		<published>2007-03-17T08:36:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71307#p71307</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71307#p71307"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71307#p71307"><![CDATA[
Thanks alot <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I am done with the pipes atleast <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=5982">iamdeath</a> — Sat Mar 17, 2007 8:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-16T23:16:49-04:00</updated>

		<published>2007-03-16T23:16:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71300#p71300</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71300#p71300"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71300#p71300"><![CDATA[
Yes, regsub would work, but it would have to be escaped, as <br><br>regsub -all {\|} $varname {} varname<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Mar 16, 2007 11:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-03-16T21:33:31-04:00</updated>

		<published>2007-03-16T21:33:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71298#p71298</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71298#p71298"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71298#p71298"><![CDATA[
Thanks for your kind, actually I have;nt yet got it done.. but I wanted to ask you if I only want to get ride of "|" can i get rid of them through regsub or regexp?..<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Fri Mar 16, 2007 9:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-14T23:20:36-04:00</updated>

		<published>2007-03-14T23:20:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71237#p71237</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71237#p71237"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71237#p71237"><![CDATA[
I just noticed I had 'body' instead of $body in that example, should be<br><br>regexp {expression} $body match etc etc etc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Mar 14, 2007 11:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-03-14T16:32:30-04:00</updated>

		<published>2007-03-14T16:32:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71234#p71234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71234#p71234"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71234#p71234"><![CDATA[
Thanks, I'll use and let you know if I have any problems..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Wed Mar 14, 2007 4:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-03-14T00:03:57-04:00</updated>

		<published>2007-03-14T00:03:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71218#p71218</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71218#p71218"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71218#p71218"><![CDATA[
Why not use regexp to get the lines you DO want, instead of regsub'ing the junk you don't?   Then you can put things into seperate vars, like for the titles and such.  And then you can put your color codes into the var strings. You can use string trim to get rid of extra spaces..<br><div class="codebox"><p>Code: </p><pre><code>regexp {&lt;span.*?&gt;Current time:&lt;/span&gt;.*&lt;span.*?&gt;(.*?)&lt;/span&gt;.*?&lt;p class.*?&gt;One-Day Internationals&lt;/p&gt;&lt;p.*?&gt;(.*?)&lt;/p&gt;.*?&lt;p.*?&gt;Standard Bank Pro20 Series&lt;/p&gt;&lt;p.*?&gt;(.*?)&lt;/p&gt;} body match date odiscores sbp20scores#antiwordwrap---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</code></pre></div>That will put the relevant data into the vars called $date $odiscores and $sbp20scores.  Then you can use regsub to get rid of \n, &lt;b&gt; and &lt;br&gt; (or use string map, either way you can put color codes in the strings if you want.)  <br><br>The regexp hasn't been tested but should work. Read the regexp manpage, and notice the () parts are what are going to be put into the variable names. The var $match is the entire string.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Mar 14, 2007 12:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-03-13T21:42:11-04:00</updated>

		<published>2007-03-13T21:42:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71216#p71216</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71216#p71216"/>
		<title type="html"><![CDATA[regsub problems.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71216#p71216"><![CDATA[
Hi, I have tried to write a code which will fetch cricket scores from a webpage and will show it to any channel.<br><br>The weblink of Score:<br><br><a href="http://content-pak.cricinfo.com/ci/engine/current/match/scores/liveframe.html" class="postlink"> Scores </a><br><br>The regsub I am using:<br><div class="codebox"><p>Code: </p><pre><code>    regsub -all "\n" $body "" body    regsub -all -nocase {&lt;br&gt;} $body "&lt;br&gt;\n" body    regsub -all {&lt;b&gt;} $body "\n\002" body    regsub -all {&lt;/b&gt;} $body "\002" body    regsub -all {World Cup Warm-up Matches} $body "\00304,01World Cup Warm-up Matches\003" body    regsub -line {&lt;p class="blueBackHeading"&gt;} $body "\n\00304,01" body    regsub -line {&lt;/p&gt;} $body "\003\n" body    regsub -all {&lt;.+?&gt;} $body "" body    regsub -all { } $body "" body    regsub -all {This page automatically refreshes every 60 seconds.} $body "" body    regsub -all {Scorecard} $body "" body    regsub -all {Desktop scorecard} $body "" body    regsub -all {Bulletin} $body "" body    regsub -all {|  |} $body "" body    </code></pre></div>The Reply I am getting:<br><div class="codebox"><p>Code: </p><pre><code>[06:33] &lt;Cricket`-&gt;         [06:33] &lt;Cricket`-&gt; Current time:01:33 GMT, Wed Mar 14, 2007[06:33] &lt;Cricket`-&gt; 04,01One-Day Internationals[06:34] &lt;Cricket`-&gt; 1st Match, Group D: West Indies v Pakistan at Kingston - Mar 13, 2007[06:34] &lt;Cricket`-&gt; West Indies won by 54 runs[06:34] &lt;Cricket`-&gt; West Indies 241/9 (50 ov); Pakistan 187 (47.2 ov) |  |  |  | Standard Bank Pro20 Series[06:34] &lt;Cricket`-&gt; Titans v Dolphins at Benoni - Mar 14, 2007[06:34] &lt;Cricket`-&gt; Match scheduled to begin at 18:00 local time (16:00 GMT)[06:34] &lt;Cricket`-&gt; Warriors v Lions at East London - Mar 14, 2007[06:34] &lt;Cricket`-&gt; </code></pre></div> <br><br>Need help:<br><br>1. I want to get rid of pipes " | "<br>2. You see that " Standard Bank Pro20 Series " is the heading it should come on a different line but it's not coming.<br>3. At the start and the end there is a blank space<br>4. The last line from the web the bot did'nt show.<br><br>Can you kindly help me out, I've tried to read regsub help alot but can't get outta it. Your help will be appreciated.<br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Tue Mar 13, 2007 9:42 pm</p><hr />
]]></content>
	</entry>
	</feed>
