Skip to Content
Former Member
Aug 12, 2009 at 09:22 PM

Verify SSN in the string


Hi ,

I have a requirement while reading the input file.

Input file is mixed up with several header records and data records

Every data record has SSN starting at fixed position.

So we need to identify the SSN in the data record and store that entire record and skip other records.

SSN format is xxx-xx-xxxx . All are numbers .

I think there might be easier to way to compare and identify this format.

Could anyone suggest the best way to do these.(May be comparing patterns,some string operation etc).Also i need to check all the 'X' are numbers.

Thanks for the help.