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

	<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-09-28T05:02:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-09-28T05:02:35-04:00</updated>

		<published>2005-09-28T05:02:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56154#p56154</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56154#p56154"/>
		<title type="html"><![CDATA[parse the html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56154#p56154"><![CDATA[
ah sorry. must have missed it, hmm, should try if it is actually faster than the other variant.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Sep 28, 2005 5:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-28T04:01:08-04:00</updated>

		<published>2005-09-28T04:01:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56153#p56153</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56153#p56153"/>
		<title type="html"><![CDATA[parse the html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56153#p56153"><![CDATA[
<blockquote class="uncited"><div>Tip: use '[^&gt;]' or '[^&lt;]' instead of '.' in cases where &lt;tag&gt; &lt;/tag&gt; is not unique, because regex tends to match the widest match, not the shortest match.</div></blockquote>there's no need of that, '*?' is a non-greedy quantifier, see the docs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Sep 28, 2005 4:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-09-28T03:40:31-04:00</updated>

		<published>2005-09-28T03:40:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56152#p56152</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56152#p56152"/>
		<title type="html"><![CDATA[parse the html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56152#p56152"><![CDATA[
Tip: use '[^&gt;]' or '[^&lt;]' instead of '.' in cases where &lt;tag&gt; &lt;/tag&gt; is not unique, because regex tends to match the widest match, not the shortest match.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Sep 28, 2005 3:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-09-28T00:51:23-04:00</updated>

		<published>2005-09-28T00:51:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56145#p56145</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56145#p56145"/>
		<title type="html"><![CDATA[parse the html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56145#p56145"><![CDATA[
suppose you want to extract what is contained between some opening and closing tags:<div class="codebox"><p>Code: </p><pre><code>[demond@whitepine demond]$ tclsh8.4% set str "&lt;tag attr=foo&gt;some text&lt;/tag&gt;"&lt;tag attr=foo&gt;some text&lt;/tag&gt;% regexp {&lt;tag.*?&gt;(.*?)&lt;/tag&gt;} $str -&gt; str1% set strsome text%</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Sep 28, 2005 12:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-09-27T04:06:53-04:00</updated>

		<published>2005-09-27T04:06:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56132#p56132</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56132#p56132"/>
		<title type="html"><![CDATA[parse the html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56132#p56132"><![CDATA[
I'd suggest to run a regexp on the complete html without string range and regsub changes.<br>if you are too unfamilar with regexpand dont want to link to the complete page I'd recommned you to try out this one:<br><a href="http://forum.egghelp.org/viewtopic.php?t=9972" class="postlink">http://forum.egghelp.org/viewtopic.php?t=9972</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue Sep 27, 2005 4:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Reynaldo]]></name></author>
		<updated>2005-09-27T01:41:16-04:00</updated>

		<published>2005-09-27T01:41:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56128#p56128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56128#p56128"/>
		<title type="html"><![CDATA[parse the html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56128#p56128"><![CDATA[
i've parse the html to $html<br><div class="codebox"><p>Code: </p><pre><code>    regsub -all "\n" $html "" html    set nopage [string first "&lt;div id=date&gt;" $html 0]    set news [string range $html $nopage [expr [string first "&lt;ul&gt;" $html $nopage] - 1]]</code></pre></div>the output $html:<div class="codebox"><p>Code: </p><pre><code>&lt;div id=tanggal&gt; Tuesday              , 27/09/2005 09:11              EST&lt;/div&gt;Today news is bla bla bla bla.              &lt;/a&gt;&lt;/div&gt;&lt;div id=summary&gt; Bla bla bla bla bla news today.            &lt;/div&gt;&lt;div id=titlebiru&gt;Read also :&lt;/div&gt;&lt;ul&gt;</code></pre></div>How to regexp the date, news topic, and the news? into $variable, so the output will be:<br>Tuesday, 27/09/2005 09:11 EST, Today news is bla bla bla. Bla bla bla bla news today.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6218">Reynaldo</a> — Tue Sep 27, 2005 1:41 am</p><hr />
]]></content>
	</entry>
	</feed>
