Code:
on *:TEXT:!url *:#:bb_url_trigger $1-
on *:INPUT:*: { if ( $1 == !url ) { bb_url_trigger $1- | halt } }

alias bb_url_trigger {
  var %input $replace($2-,$chr(36), $+ $chr(36) $+ ,$chr(37), $+ $chr(37) $+ ,$chr(62),.,$chr(124),.)
  if ( !%input ) || ( $2 == help ) {
    $iif($nick == $me,echo -ta,.notice $nick) URL-SEARCH
    $iif($nick == $me,echo -ta,.notice $nick) Usage: !url searchstring (wildcards possible)
    $iif($nick == $me,echo -ta,.notice $nick) Example: "!url german.imdb" or "!url BrotBueXe" or "!url that*the"
    $iif($nick == $me,echo -ta,.notice $nick) Hint: You can only get urls that are catched anytime in this chan. You can search for nicks or msgs also.
    halt
  }
  var %n = 1, %i = 1, %m = 10
  while (%i <= %m) {
    var %line = $read(" $+ $scriptdir $+ bb-urlcatcher.hist $+ ",w,$+(*,$chr(9),$iif($nick == $me,*,$chan),$chr(9),*,%input,*),%n) | var %n = $readn | inc %n
    if ( %line == $null ) {
      if (%i == 1) { $iif($nick == $me,echo -ta ,.notice $nick) nothing found :/ }
      var %i = %m
    }
    else {
      ;$iif($nick == $me,echo -ta,msg $iif($chan != null,$ifmatch,%nick)) [URLHIST] $gettok(%line,1,9) / $gettok(%line,3,9) $+ : $gettok(%line,4,9)
      $iif($nick == $me,echo -ta,.notice $nick) Entrys: $lines(" $+ $scriptdir $+ bb-urlcatcher.hist $+ ") - New: %bb-url-catcher-new - Overall: %bb-url-catcher-count
      $iif($nick == $me,echo -ta,.notice $nick) $gettok(%line,5,9)  posted on $chr60 $gettok(%line,1,9) $+ $chr60 by $chr60 $+ $chr60 $gettok(%line,3,9)
    }
    inc %i
  }
}

* code untested * No flood control present use MIRC flood control *

I simply added a line to start searching from counter %n and a loop counter %i, and a max loop counter %m (10), each time it does a search, it updates the %n value to the located line $readn + 1, so the next search well be from the line after that, then if the line is empty and were still on the first of the it says nothing found, and either way if line is empty sets %i to %m (last loop), the rest is all yourt code using %line, up till the end where i added a INC %i, and loop back in the WHILE loop, you might want to add into your code the use of %i to say RESULT # $+ %i IS or some such blah....

This should give you between 0 - nothing found and 10 results