Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Audit a filename for specific format

rtlane
8 - Asteroid

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?

 

 

 

 

3 REPLIES 3
dougperez
12 - Quasar

This should do it

MarqueeCrew
20 - Arcturus
20 - Arcturus

@rtlane ,

 

You might try this workflow.  It includes a RegEx tool using a match function.

 

\u\l+\s*\u*\l*\s\u{2}\s\u+\s\u\l+\s\d{6}

 

word with possibility of a second word then a space then 2 uppercase letters a space and another word then 6 numbers

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
rtlane
8 - Asteroid

Thank you both. This worked great. 

Labels