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

	<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-10-03T19:22:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-10-03T19:22:17-04:00</updated>

		<published>2007-10-03T19:22:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76365#p76365</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76365#p76365"/>
		<title type="html"><![CDATA[trimleft and other string problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76365#p76365"><![CDATA[
This page might help: <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/string.htm" class="postlink">Tcl Built-In Commands - string manual page</a>  <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=3646">Alchera</a> — Wed Oct 03, 2007 7:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lacedrabbit]]></name></author>
		<updated>2007-10-03T18:18:17-04:00</updated>

		<published>2007-10-03T18:18:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76364#p76364</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76364#p76364"/>
		<title type="html"><![CDATA[trimleft and other string problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76364#p76364"><![CDATA[
Ok, heres a tidied up version - thanks 'iamdeath'<br><div class="codebox"><p>Code: </p><pre><code>                if {[file exists $searchfile]} {                        set filech [open $searchfile r]                        while {![eof $filech]} {                                gets $filech line                                set edline $line                                set strip [stripcodes bcruag $edline]                                if {[string match -nocase *$text* $edline] &amp;&amp; [string match -nocase *#* $edline] } {                                        puthelp "PRIVMSG #melwakechan : Result - [string trimleft $strip "#"] -"                                                }                        }                close $filech                }</code></pre></div>although your advice helped tidied up my code, and I am grateful,<br>but I still have the output problem, I would like to get rid of the text to the left of the '#'<br><blockquote class="uncited"><div>Result - [17:10] &lt;Jory`&gt; #11 «701 MB» Wrong.Turn.2.LIMITED.DVDSCR.XViD-mVs - (4 gets) -</div></blockquote>does anyone know of a good url for reference for string manipulation as every sight I have read says this should be working.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9334">lacedrabbit</a> — Wed Oct 03, 2007 6:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamdeath]]></name></author>
		<updated>2007-10-03T14:17:46-04:00</updated>

		<published>2007-10-03T14:17:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76361#p76361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76361#p76361"/>
		<title type="html"><![CDATA[trimleft and other string problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76361#p76361"><![CDATA[
<blockquote class="uncited"><div>if {[string match *$lwrtext* $lwrcase] &amp;&amp; [string match *#* $edline] } { </div></blockquote>I think you should try:<br><div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase $lwrtext $lwrcase] &amp;&amp; [string match -nocase *#* $edline] } { </code></pre></div>and use <br><br>* in $lwrtext <br><br>for Example:<br><div class="codebox"><p>Code: </p><pre><code>set lwrtext { "*text1*" "*text2*" "*text3*" }</code></pre></div>Then use it in proc and don't forget to take it into Global<br><div class="codebox"><p>Code: </p><pre><code>foreach lwrtext $lwrtext { if {[string match -nocase "$lwrtext" $lwrcase] &amp;&amp; [string match -nocase *#* $edline]} {</code></pre></div>I am not sure about it but once I had the same problem I solved it with that. <br><br>Thanks<br>iamdeath<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5982">iamdeath</a> — Wed Oct 03, 2007 2:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lacedrabbit]]></name></author>
		<updated>2007-10-03T09:25:48-04:00</updated>

		<published>2007-10-03T09:25:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76355#p76355</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76355#p76355"/>
		<title type="html"><![CDATA[trimleft and other string problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76355#p76355"><![CDATA[
Hello There, <br>i have read nearly every forum post relating to this problem<br>ive search and everything, heres my problem<br><br>I've logged a chan output to logfile, i've brought it back in<br>gave it a string and everything, worked out how to strip the colors from it<br><br>heres the code i have..<br><div class="codebox"><p>Code: </p><pre><code>               if {[file exists $searchfile]} {                        set filech [open $searchfile r]                        while {![eof $filech]} {                                gets $filech line                                set edline $line                                set edline2 $line                                set endofname "x"                                set lwrtext [string tolower $text]                                set lwrcase [string tolower $edline]                                set strip [stripcodes bcruag $edline2]                                if {[string match *$lwrtext* $lwrcase] &amp;&amp; [string match *#* $edline] } {                                                        puthelp "PRIVMSG #melwakechan : Result - [string trimleft $strip "#"] -"                                                                }                                }                        }                close $filech</code></pre></div>from my view point I can't see why it doesn't take info out of the output<br>this is just my final way of coding it, I have tried many, all of which failing<br><br>finding the line is not the problem here, what I want to do is format the line so I can do something useful with it. this is just the start of this application, but it doesn't make any sense at all to me..<br><br>Even a Your making no sense here would be appreciated<br><br>this is what I am getting in the channel, I would have thought from my reading that everything to the left of the # would be gone,or even just no #.<br><blockquote class="uncited"><div>Result - [03:05] &lt;[am]-32263&gt; #4  1x [705M] Oceans.13.R5.Line.XViD-ViSUAL.avi -</div></blockquote>Thanks.<br>lacedrabbit<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9334">lacedrabbit</a> — Wed Oct 03, 2007 9:25 am</p><hr />
]]></content>
	</entry>
	</feed>
