howdy all,

i'm working on some code for the imdb search site... and i've pretty much got it worked out, except this one thing.... i'm trying to pull the casting info from the pages but the html code is extremly long and i'm not sure how to do it.. this is an actual piece of the string:
Code:
<hr/>
<img src="http://i.imdb.com/images/tn15/header_cast.gif" width="34" height="20" alt="Cast"><small style="position: relative; top: -5px">(Cast overview, first billed only)</small><div class="info"><table class="cast">  <tr class="odd"><td class="hs"><a href="/rg/title-tease/tinyhead/name/nm0000242/"><img src="http://ia.ec.imdb.com/media/imdb/01/I/57/23/48t.jpg" width="23" height="32" border="0"></a><br></td><td class="nm"><a href="/name/nm0000242/">Mark Wahlberg</a></td><td class="ddd"> ... </td><td class="char">Bob Lee Swagger</td></tr><tr class="even"><td class="hs"><a href="/rg/title-tease/tinyhead/name/nm0671567/"><img src="http://ia.ec.imdb.com/media/imdb/01/I/92/54/60/10t.jpg" width="23" height="32" border="0"></a><br></td><td class="nm"><a href="/name/nm0671567/">Michael Pe&#241;a</a></td><td class="ddd"> ... </td><td class="char">Nick Memphis</td></tr><tr class="odd"><td class="hs"><a href="/rg/title-tease/tinyhead/name/nm0000418/"><img src="http://ia.ec.imdb.com/media/imdb/01/I/51/25/22t.jpg" width="23" height="32" border="0"></a><br></td><td class="nm"><a href="/name/nm0000418/">Danny Glover</a></td><td class="ddd"> ... </td><td class="char">Colonel Isaac Johnson</td></tr><tr class="even"><td class="hs"><a href="/rg/title-tease/tinyhead/name/nm0544718/"><img src="http://ia.ec.imdb.com/media/imdb/01/I/95/85/58t.jpg" width="23" height="32" border="0"></a><br></td><td class="nm"><a href="/name/nm0544718/">Kate Mara</a></td><td class="ddd"> ... </td><td class="char">Sarah Fenn</td></tr><tr class="odd"><td class="hs"><a href="/rg/title-tease/tinyhead/name/nm0000480/"><img src="http://ia.ec.imdb.com/media/imdb/01/I/44/03/32/10t.jpg" width="23" height="32" border="0"></a><br></td><td class="nm"><a href="/name/nm0000480/">Elias Koteas</a></td><td class="ddd"> ... </td><td class="char">Jack Payne</td></tr><tr class="even"><td class="hs">
 


i found a similar post by searching the forums... but i dont understand one lick of it.. i'm using this piece of code to parse the rest of the info on the pages:
Code:
alias  _htmlconv {
  var %x = $regsubex($1-,/(?:&#(\d*?);)/g,$chr(\t))
  noop $regsub(%x,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x)
  return $remove(%x,&,$chr(9))
}
 

but i'm pretty sure that wont or can't handle what i want to do here..i'm pulling the info from the page and writing it to file using bwrite from the sockread and then calling the info from the file into hash table using the fread and fseek commands. ex:
Code:
on *:sockread:blank:{
  if ($sockerr) { Halt }
  sockread -f &a
  bwrite file.dat -1 -1 &a
}
on *:sockclose:blank:info

alias info {
  var %table = $remove(%title,$chr(32)) $+ .hsh
  .fopen imdb file.dat
  .fseek -w imdb *<h5>Directed by</h5>*
  noop $fread(imdb)
  hadd %table Director $_htmlconv($fread(imdb))
.fclose imdb
}
 

and from there i use another alias to input the info i want into a dialog from the hash table...
so if anyone would be willing to help with this.. it would be greatly appreciated..

thanks in advance