Posted to tcl by schelte at Thu Jun 02 15:26:02 GMT 2011view pretty
foreach oscar [split $imdbdata \n] { if {[regexp {<title>(.*)\((.*)\) - IMDb</title>} $oscar tp0 tp1 tp2 tp3]} { set fas1 "$tp1" set fas12 "$tp2" } if {[regexp { (.*)min } $oscar tpp0 tpp1 tpp2 tpp3]} { set fas2 "$tpp1 $tpp2" } if {[regexp {class="rating-rating">(.*)<span>/(.*)</span></span>} $oscar tppp0 tppp1 tppp2]} { set fas3 "$tppp1" set fas33 "$tppp2" } foreach {full tpppp} [regexp -all -inline {href="/genre/.*?">(.*?)</a>} $oscar] {lappend fas4 $tpppp} } set fas2 [string trimright $fas2] putlog "$fas1$fas12 $fas2\min [join $fas4 " | "] $fas3/$fas33"