Code:
on *:TEXT:!search *:#p: {
  msg # 7:: Limit of 5 results
  var %line = 1,%i = 0
  while ($read(nick.txt,nw,$+(*,$$2-,*),%line)) { 
    msg # 7:: 11[10MA7T10CH11]7 $ifmatch
    %line = $readn + 1
    inc %i
    if %i == 5 { break }
  }
}

how can i msg to $chan if nothing was found

thx bodo