There are at least two possible solutions. a) read the line and use a regex to find out whether you add it to the list. b) read every line and add all of them to the list. Later when you parse the...