Originally posted by kenji mapes: By "invalid" I mean not folowing the above format.
Satou was probably referring to the specifics of the above format. For example, is SSN a number or can it contain letters? if number, what is the valid range? Can the first and last name contain numbers? What is a valid grade? etc.
Anyway, if all you are concerned with is the number of fields, that are separated by a specific delimiter, then probably using split() is best -- as you also want an array of the components.
So I was not given too much criteria on what to check for, only to check the "format." So, from the providd files, it appears an invallid format, would be one without all the proper field regardless of the characters, etc.
So how would I check? Maybe number of delimeters? i was also thinking that I could put it into the array, and then just delete it?