while read line of file, extract string from line