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

	<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-02-19T00:44:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-02-19T00:43:48-04:00</updated>

		<published>2005-02-19T00:43:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46751#p46751</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46751#p46751"/>
		<title type="html"><![CDATA[need help with regexp and html code [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46751#p46751"><![CDATA[
after some relaxing and thinking again I got THE idea, so sorry for bothering.<br>Thats the trick, just putting the 3 into 1 regexp and replacing the \n and \t part with .* .<div class="codebox"><p>Code: </p><pre><code>regexp {&lt;td&gt;&lt;span class="Body"&gt;(.{1,5}) °C(.*)&lt;td&gt;&lt;span class="Body"&gt;(.{4,6}) hPa(.*)&lt;td&gt;&lt;span class="Body"&gt;(.{1,3}) km/h / (.{3,12})&lt;/span&gt;} $state(body) {} temp {} druck {} windg windr</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat Feb 19, 2005 12:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-02-19T00:44:07-04:00</updated>

		<published>2005-02-18T23:05:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46750#p46750</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46750#p46750"/>
		<title type="html"><![CDATA[need help with regexp and html code [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46750#p46750"><![CDATA[
after reading the tcl doc and the faq related here I got really far, but now I am out of ideas.<br>here my current code<div class="codebox"><p>Code: </p><pre><code>regexp {Temperatur:&lt;/span&gt;&lt;/td&gt;\r\n\t*&lt;td&gt;&lt;span class="Body"&gt;(.{1,5}) °C} $state(body) {} tempregexp {Luftdruck:&lt;/span&gt;&lt;/td&gt;\r\n\t*&lt;td&gt;&lt;span class="Body"&gt;(.{4,6}) hPa} $state(body) {} druckregexp {Wind:&lt;/span&gt;&lt;/td&gt;\r\n\t*&lt;td&gt;&lt;span class="Body"&gt;(.{1,3}) km/h / (.{3,12})&lt;/span&gt;} $state(body) {} windg windr</code></pre></div>html code I am triing to phrase (<a href="http://www.wetter.com/v2/?SID=&amp;LANG=DE&amp;type=WORLD&amp;LOC=7000&amp;LOCFROM=7000&amp;id=&amp;id=31802" class="postlink">wetter.com</a>, German!):<div class="codebox"><p>Code: </p><pre><code>&lt;tr&gt;&lt;td width="100"&gt;&lt;span class="Headline"&gt;Temperatur:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="Body"&gt;-0.7 °C&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="Headline"&gt;Luftdruck:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="Body"&gt;1015.8 hPa&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="Headline"&gt;Wind:&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span class="Body"&gt;26 km/h / West&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;</code></pre></div>Then I noticed... HEY, idiot! You are reading a Unix type html file, you need \n not \r\n. But the funny thing is, if I replace \r\n with \n, I'll get this:<blockquote class="uncited"><div>[03:48:03] * Last context: tclhash.c/684 [Tcl proc: getwetter_cmd, param:  $_pub1 $_pub2 $_pub3 $_pub4 $_pub5]<br>[03:48:03] * Please REPORT this BUG!<br>[03:48:03] * Check doc/BUG-REPORT on how to do so.<br>[03:48:03] * Wrote DEBUG<br>[03:48:03] * SEGMENT VIOLATION -- CRASHING!</div></blockquote><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>any idea to get the 4 values? I could leave out the code before the new line in the 1st and 2nd, but never in the 3rd line. Do I have to use something else for newlines in the expression or is "\t*" not refering to an unspecific amount of tabs?.<br><br>PS: $state(body) contains the correct html code (between &lt;body&gt; and &lt;/body&gt;), I get 2 other values correct.<br><br>PPS: if you believe having the whole code will make you able to help me, I can send the code via PM/email. Since it has 155 lines and is German only commented, it might not help much anyway and I'd just risk someone takes my code without credit <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br>PPPS: ah yeah, just remembered... using another weather script won't help. Their source page all suck when it comes to German weather, I want to use <a href="http://www.wetter.com" class="postlink">www.wetter.com</a>. In case you have seen another script for this page, I'd be happy, too. I could only find a remote script, but I it doesnt look, like I could anything from there <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">. I don't even know if this code would actually really work <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=2382">De Kus</a> — Fri Feb 18, 2005 11:05 pm</p><hr />
]]></content>
	</entry>
	</feed>
