I thought the same, but nah its not.... there is nothing on the top line at alll!!!.....speechles wrote:The problem is he has 'junk' before the #comment in the very first top line. Interpreter sees that and hits the panic button and freaks out causing all this. Removing said 'junk' will solve it.
Code: Select all
bind pub - !curr xepub
bind msg - !curr xemsg
Change this part:<speechles> !webby http://www.xe.com/ucc/convert.cgi?Amoun ... EUR&To=USD --regexp <title>.*?rate\:\s+(.*?)\s+=\s+(.*?)</title>--
<sp33chy> webby: conflict! http-package reports: iso8859-1 .. using charset detected from html meta tagging: utf-8 to avoid conflict.
<sp33chy> regexp: capture1 ( 1.00 EUR )
<sp33chy> regexp: capture2 ( 1.44060 USD )
Code: Select all
if {[regexp {>Live rates at (.*?)</span>} $html match xetime] \
&& [regexp {<td width="45%" align="right" class="XEenlarge"><h2 class="XE">(.*?)</h2></td>} $html match fromamount] \
&& [regexp {<td width="45%" align="left" class="XEenlarge"><h2 class="XE">(.*?)</h2></td>} $html match toamount]} {
regsub -all {<!.*?>} $fromamount {} fromamount
regsub -all {<!.*?>} $toamount {} toamount
puthelp "PRIVMSG $chan :XE.COM: \002$fromamount\002 equals \002$toamount\002 as of $xetime"
} else {
puthelp "PRIVMSG $chan :Could not obtain results from XE.com, sorry!"
}
Code: Select all
if {[regexp {>Live rates at (.*?)</span>} $html match xetime] && [regexp --nocase {<title>.*?rate\:\s+(.*?)\s+=\s+(.*?)</title>} $html match fromamount toamount]} {
puthelp "PRIVMSG $chan :XE.COM: \002$fromamount\002 equals \002$toamount\002 as of $xetime"
} else {
puthelp "PRIVMSG $chan :Could not obtain results from XE.com, sorry!"
}
Code: Select all
Tcl error [xepub]: syntax error in expression "[regexp {>Live rates at (.*?)</span>} $html match xetime] \ ...": extra tokens at end of expression