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

	<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-05-12T04:48:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2005-05-12T04:48:20-04:00</updated>

		<published>2005-05-12T04:48:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49392#p49392</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49392#p49392"/>
		<title type="html"><![CDATA[I hate using regexp...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49392#p49392"><![CDATA[
Thanks, but I'd resolved it using another way (have a look to the tcl bash.tcl).<br>In fact, my big trouble is that I'm too used to work with PHP and it's hard to forget some tools <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu May 12, 2005 4:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-05-11T18:16:08-04:00</updated>

		<published>2005-05-11T18:16:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49381#p49381</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49381#p49381"/>
		<title type="html"><![CDATA[I hate using regexp...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49381#p49381"><![CDATA[
if the number of lines are fix, I would suggest using neither -inline neither -all and include all matching lines into the regexp. I have regular expressions that are over 800 byte, so dont worry about it as long this is nothing called to often ^-^.<br><br>Another suggestion would be to use regsub to kill the code you dont need and split it on \n then or so.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed May 11, 2005 6:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2005-05-10T12:50:15-04:00</updated>

		<published>2005-05-10T12:50:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49316#p49316</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49316#p49316"/>
		<title type="html"><![CDATA[I hate using regexp...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49316#p49316"><![CDATA[
Hi there, I've a little trouble using regexp.<br>Here's my code.<div class="codebox"><p>Code: </p><pre><code>proc bash:random {nick uhost handle chan args} {set key [http::geturl $::rand_url]set line [http::data $key]set quote [regexp -inline -all {&lt;p class="qt"&gt;[^\f\t\v]{1,}&lt;/p&gt;} $line]foreach qt [split $quote "\n"] {if {[string first $quote "&lt;b&gt;#"] &gt; 0} {return}set show_quote [uncode $qt]if {$show_quote != ""} {putserv "PRIVMSG $chan :$show_quote"}}putserv "PRIVMSG $chan :\002End of quote\002"}</code></pre></div>the source code I try to parse is like this:<div class="codebox"><p>Code: </p><pre><code>&lt;p class="something"&gt;&lt;b&gt;#1&lt;/b&gt;&lt;/p&gt;&lt;p class="qt"&gt;here is a line&lt;br /&gt;and another one&lt;/p&gt;&lt;p class="something"&gt;&lt;b&gt;#2&lt;/b&gt;&lt;/p&gt;&lt;p class="qt"&gt;oh, a line&lt;br /&gt;and another one&lt;/p&gt;</code></pre></div>I want to obtain:<blockquote class="uncited"><div>&lt;egg&gt; here is a line<br>&lt;egg&gt; and another one<br>&lt;egg&gt; --- Next ---<br>&lt;egg&gt; oh, a line<br>&lt;egg&gt; and another one<br>&lt;egg&gt; End of quote</div></blockquote>and I can't because the regexp returns:<blockquote class="uncited"><div>&lt;egg&gt; here is a line<br>&lt;egg&gt; and another one<br>&lt;egg&gt; #2 oh, a line<br>&lt;egg&gt;and another one<br>&lt;egg&gt; End of quote</div></blockquote>I can't succeed in finding the good way to have the regexp splitting my source in an array, or other format allowing me to have each part separated.<br>I know I can split on '&lt;p class="something"&gt;' but I'm sure I can find a beautifull way with regexp...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue May 10, 2005 12:50 pm</p><hr />
]]></content>
	</entry>
	</feed>
