Hello, I want to search something on a text file and message the results (max 5 results) on the channel.

I already did this code (see below) , but this code only gives me 1 result no more, even if I have more than 1 result on the text file.

Code:
on *:TEXT:*:#chan:{
  if ($1 == !search) && ($2 != $null) {
    set %ress $read(file.txt, w, $replace(* $+ $2- $+ *,$chr(32),*) )
    if (%ress != $null) {
    .timerM 1 1 msg #chan %ress }
    else { .timerM 1 1 msg #chan Nothing Found
    }
  }
}


What can I do to modify the code to give me X results?

Thanks