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

	<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>2011-01-26T12:39:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2011-01-26T12:39:34-04:00</updated>

		<published>2011-01-26T12:39:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95844#p95844</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95844#p95844"/>
		<title type="html"><![CDATA[Parsing from webcontent]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95844#p95844"><![CDATA[
<a href="http://www.imdb.com/title/tt0942385/" class="postlink">http://www.imdb.com/title/tt0942385/</a><br><blockquote class="uncited"><div>set real_var "$real_var|$match"</div></blockquote>Sounds good <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Im excited to see how that proc part will look like<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Wed Jan 26, 2011 12:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Trixar_za]]></name></author>
		<updated>2011-01-26T12:15:01-04:00</updated>

		<published>2011-01-26T12:15:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95843#p95843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95843#p95843"/>
		<title type="html"><![CDATA[Parsing from webcontent]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95843#p95843"><![CDATA[
Could you post the link to the website? Might be easier to see how it handles different kinds of input and how it changes the code.<br><br>foreach is a good start btw, but why don't you add each match to the end of a single variable like set real_var "$real_var|$match" - this way you don't need to make the regex match do all the work and you get a near unlimited amount of genres you could add so long as they match the regex. They'll all end up looking like Adventure|Action|Fantasy with the above example.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10958">Trixar_za</a> — Wed Jan 26, 2011 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Elfriede]]></name></author>
		<updated>2011-01-26T10:14:12-04:00</updated>

		<published>2011-01-26T10:14:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95842#p95842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95842#p95842"/>
		<title type="html"><![CDATA[Parsing from webcontent]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95842#p95842"><![CDATA[
Hi @ all <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I'd like to parse -&gt;<br><div class="codebox"><p>Code: </p><pre><code>&lt;a href="/genre/Action"&gt;Action&lt;/a&gt; &lt;span&gt;|&lt;/span&gt; &lt;a href="/genre/Adventure"&gt;Adventure&lt;/a&gt; &lt;span&gt;|&lt;/span&gt; &lt;a href="/genre/Comedy"&gt;Comedy&lt;/a&gt;</code></pre></div>the genres, like Action/Adventure/Comedy. What i have<br><div class="codebox"><p>Code: </p><pre><code>foreach line [split $content \n] {if {[regexp -nocase {&lt;a\shref="\/genre\/(.*)"&gt;(.*)&lt;\/a&gt;} $line match genre1 genre2 genre3]} {</code></pre></div>and i knwo, that is bad. Next problem: Im not knowing at the beginning how many genres ill have to parse. it can be just one or up to 4 or somethg like that.<br><br>Thank you !<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9204">Elfriede</a> — Wed Jan 26, 2011 10:14 am</p><hr />
]]></content>
	</entry>
	</feed>
