I'm trying to audit filenames in a directory for a specific format. Say the correct format is: (City) (2 letter state) (fixed word) (fixed word) (6 digit date).
The city can be any number of words. The state always needs to be 2 letters. There are 2 fixed words that won't change, followed by a six-digit date.
For example:
Orlando FL ABC Defg 100621
Oklahoma City OK ABC Defg 100121
Raleigh ABC Defg 100221
Altlanta GA AB Def 100221
How can I audit it to flag as the 3rd row being incorrect and specify it is missing the 2 letter state? Or the 4th row "AB" and "Def" is incorrect?