I have an assignment to input a quadratic equation from a text file.

the file will be set up as follows
1,2,3

however I need to test for letters, spaces , obviously comma's all those are fine but have been unable to stop !,@,#,$.%.^.&.*.(,) coming through as numbers

can anybody point me in the right direction