I have a script which downloads a webpage from a webserver and goes through the code to pick out certain variables. I want it to pick out the line after :
<font color=yellow>

It works fine almost always but sometimes it doesn't. Since the /sockread reads only so much into the buffer at once, the buffer runs out right after the font tag is read. Is there a way to prevent this from happening?

Code:
on 1:SOCKREAD:hiscores: {
  echo 4 -a RELOAD
  if ($sockerr &gt; 0) { return }
  :nextread
  sockread %line
  if ($sockbr == 0) { return }
  echo -a &gt;&gt; %line
  if ((%search != 0) &amp;&amp; (%line = &lt;font color=yellow&gt;)) {
    ;  echo -a !&gt; %search
    sockread %line
    % [ $+ [ %search ] ] = $left(%line,$calc($len(%line)-4))
    %search = 0
  }
  if ($regex(%line,(?:&lt;table&gt;&lt;tr&gt;|&lt;/td&gt;)&lt;td&gt;&lt;b&gt;(.*)&lt;/b&gt;&lt;br&gt;) != 0) {
    %search = $regml(1)
    ;  echo -a &gt;&gt; %search
  }
  if ((%Name != $null) &amp;&amp; (%XP != $null) &amp;&amp; (%Rank != $null) &amp;&amp; (%Level != $null)) {
    displayresults
    return
  }
  else {
    goto nextread
  }
} 


Here's a portion of what's echoed back:

Code:
&gt;&gt; 46400250&lt;br&gt;
&gt;&gt; 32837000&lt;br&gt;
&gt;&gt; 58606250&lt;br&gt;
&gt;&gt; 34997000&lt;br&gt;
&gt;&gt; &lt;font color=yellow&gt;
 [color:red] RELOAD[/color] 
&gt;&gt; 34630500&lt;br&gt;
&gt;&gt; &lt;/font&gt;
&gt;&gt; 33782500&lt;br&gt;
&gt;&gt; 27138500&lt;br&gt;