How is the file organised? - line by line ? csv?
the roughest (but easiest) way would be to load the txt file into an array ,
<? $file=file("text.txt");
/now $file[0] contains the first line of the text file etc, now wether you use regex or something simpler depends on the contents of the file./
for($x=0;$x<count($file);$x++){
if(ereg("abc",$file[$x]))
{echo "Found on line $x";}
}
?>