Use regex to determine if a line should be removed from a file.