Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Extract "Strings" from a list of files names

Terrymax
7 - Meteor

Hi All

 

I have a list of files names, i want to extract strings in the 1st () and the last () of each file names below , then write to a new filed.  

 

The expected format like  : zz aaa ; zz bbb

 

List Name

MASTER (ZZ) DAT FILE v16(Final)_xxxx (aaa)_Jun'21.xlsx
MASTER (ZZ) DAT FILE v16_xxxx (bbb)_June'21.xlsx
MASTER (ZZ) DAT FILE v16 (2021) (cccc)_Jun'21.xlsx
MASTER (ZZ) DAT FILE v16 (2021) (dddddd)_Jun'21.xlsx
MASTER (YYY) DAT FILE v16 (2021)_xxxx (eeeeeei)_June'21.xlsx
MASTER (YYY) DAT FILE v16 (2021) _xxxx(ffffff)_June '21.xlsx
MASTER (YYY) DAT FILE v16 (2021) _xxxx(gggggg)_Jun '21.xlsx
MASTER (YYY) DAT FILE v16 (2021)_xxxx (hhhhhh)_17 Jun 2021.xlsx
2 REPLIES 2
RolandSchubert
16 - Nebula
16 - Nebula

Hi @Terrymax ,

 

you can use FindString to find the first "(" and ")" and SubString to extract the string between the brackets, for the last brackets the same would be possible using ReserveString - you have to find the string between ")" and "(" and reverse the result. I've attached a sample workflow. Of course it is possible using RegEx as well.

 

Let me know if it works for you.

 

Best,

 

Roland

Terrymax
7 - Meteor

It works! Super! Thanks so much! 

Labels