in reply to Extract lines from text file

if you also want to search for a number, just change toolics code to collect name and numbers in an array. Reset that array whenever you see the next name. Also have a variable $found that you set to 1 if you find the name or number and set to 0 whenever you see the next name. But first when you find the next name and $found is 1, print out the data you collected in the array.