Alteryx Designer Desktop Discussions

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

Identifying the First Five Characters if All are Alpha Characters

djodts
8 - Asteroid

Hello,

 

I have a column of filenames and am looking for something (hopefully an if statement) that can identify the files where the first five characters are alpha characters.  These can be marked as "true" and those that are not with "false".  Please see the example below.

 

 

clipboard_image_0.png

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @djodts 

 

A good REGEX might fit your case.

 

Use Formula Tool. Create a field, change its type to Bool.

 

REGEX_Match([Field1], "^[A-Z]{5}.*$")

 

Cheers,

JShankman
7 - Meteor

Use a RegEx tool, where the output Method is "Match", and the Regular Expression = ^[[:alpha:]]{5}.*

JosephSerpis
17 - Castor
17 - Castor

Hi @djodts  there a number of ways you could do this using a regex tool using a parse or match function or within a formula tool. Provided a workflow with all three options.RegexMatch070819.JPG

djodts
8 - Asteroid

Thanks all for your help (@Thableaus@JShankman, & @JosephSerpis)           

 

I appreciate the quick replies!  All were helpful.

Labels