Retrieve lines to match through getline()