Alteryx Designer Discussions

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

Formula to include Wildcard

pohrt
7 - Meteor

Hello all, 

 

probably beginners question:

I need to dynamically Filter for File names in a Directory. Everything works except I have to separate the Files that I want:

Example of the file name patterns

SUMMER-NEW1-xxxx_yyyyyy

SUMMER-NEW2-yyyyy_zzzzz

SUMMER-NEW3-zzzzzzzzz_uuuuu

SUMMER-NEW2_testing

SUMMER-NEW3_xxxxxxx

 

I want to use all Files (true) that have something like 

*begin with SUMMER-NEW then have "?" (one character) then have "_" (underscore)

 

The issue is

* that those files have an "underscore" in their names further on

* I need a Wildcard for 1 character then followed by an underscore for those files that I don't want (false).

 

Hope that makes sense?

Thanks already,

Petra

 

 

 

 

2 REPLIES 2
MarqueeCrew
19 - Altair
19 - Altair

@pohrt ,


If there is only a 1 digit #, a startswith() function and substring () will work fine.  

!regex_match([field],"SUMMER-NEW\d+_.*")

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Please Subscribe to my youTube channel.
pohrt
7 - Meteor

Thanks Mark,

 

I still had a few incorrectly included files and reversed your formula:

regex_match([field],"SUMMER-NEW\d+-.*")

 

... and this worked fine.

 

THANK YOU

Petra

 

Labels