Specific reading of CSV file

Hello!
I have a csv file that has the following strings on it:
Full Name, Telephone Number, Email Address.

This file will contain incorrect information - for example a telephone number such as 622ABC456DD6555.
I have to make a program that will read the input, but eliminate unnecessary data, or if all the date is corrupted- state so.

Full name is first and last name of a person, which can only contain letters.
Telephone number can be only numbers, but can contain parentheses in this format
(###)### ####, or be written as ###-###-####.

Email address can be a mix, but can only have one @ symbol.

For email, this was easy to do, but what would be an elegant way for the rest?
For example, I can make a loop that checks every character in those strings.
But for telephone, for example, I dont want to make a check that asks whether the input is equal to 1, then to 2, then to 3... all the way to 9.

Is there any elegant way of doing this?
To validate the phone number you can use regular expressions.
http://www.cplusplus.com/reference/regex/
Thank you both!
Topic archived. No new replies allowed.