Code: Select all
proc text {n u h c t} {
set x [::http::geturl http://www.website.com/example.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
Code: Select all
proc text {n u h c t} {
set x [::http::geturl http://www.website.com/example.txt]
foreach e [split [::http::data $x] \n] {puthelp "privmsg $c :$e"}
::http::cleanup $x
}
Code: Select all
3<left>501 NEW JERSEY <right> 96<br><left>502 ORLANDO <right> 85<br><center><h> FINAL</h><br><br>
3<left>503 LA CLIPPERS <right> 75<br><left>504 INDIANA <right> 97<br><center><h> FINAL</h><br><br>
3<left>505 GOLDEN STATE <right>100<br><left>506 PHILADELPHIA <right>111<br><center><h> FINAL</h><br><br>
3<left>507 SAN ANTONIO <right>107<br><left>508 NEW YORK <right> 96<br><center><h> FINAL</h><br><br>
3<left>509 UTAH <right> 89<br><left>510 BOSTON <right>101<br><center><h> FINAL</h><br><br>
3<left>511 NEW ORLEANS <right> 69<br><left>512 MINNESOTA <right> 88<br><center><h> FINAL</h><br><br>
3<left>513 PORTLAND <right> 79<br><left>514 MEMPHIS <right> 89<br><center><h> FINAL</h><br><br>
3<left>515 TORONTO <right> 80<br><left>516 HOUSTON <right> 67<br><center><h>08:25 4th Q</h><br><br>
3<left>517 WASHINGTON <right> 74<br><left>518 DENVER <right> 70<br><center><h>04:17 3rd Q</h><br><br>
Code: Select all
foreach e [split [::http::data $x] \n] {
if {[regexp {^3} $e] == 1} {
puthelp "privmsg $c :$e"
Code: Select all
if {[regexp {^\x020[3]} $e] == 1} {
Code: Select all
3<left>501 NEW JERSEY <right> 96<br><left>502 ORLANDO <right> 85<br><center><h> FINAL</h><br><br>
Code: Select all
NEW JERSEY 96 ORLANDO 85 FINAL
Code: Select all
regsub -all -- {^3|<(/?)[A-z]{1,}>} $string "" string
# remove the extra spaces
set string [join $string]