You will just need in your text file a line at a time. Search the string for the characters // or /*. If it finds them, then loop back and read another line. If it doesn't find them, you must have a good line of data and you can pass on to the next part of your cod.