Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex

BRRLL99
11 - Bolide

Hi

I have following input

 

/tenants/ct/108251/prod/rec/processing/apac_me/GLASS_CDGL_APAC_MONTHLY_20220831_CD01_20220901222348 EXCEPTION_20220901222916.CSV
 /tenants/ct/108251/prod/rec/processing/apac_me/GLASS_DYNAMO_2022-08-21-20220205_20220204210647.CSV

 

 Required Output:

GLASS_CDGL_APAC_MONTHLY_CD01.CSV
GLASS_DYNAMO.CSV

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus

@BRRLL99 ,

 

 no Regex required: 

 

Filegetfilname()+filegetext()

 

 

 

 

https://help.alteryx.com/20221/designer/file-functions

 

cheers,

 

 mark

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
BRRLL99
11 - Bolide

Should i use formula tool?

MarqueeCrew
20 - Arcturus
20 - Arcturus

@BRRLL99 ,

 

 if you want to preserve the desired output, yes I would use the formula tool.  You will combine the two expressions to get the file name plus the file extension consented together. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
BRRLL99
11 - Bolide

i don't see any Filegettext function

 

BRahuL99_0-1663686987556.png

 

flying008
15 - Aurora

Hi, @BRRLL99 

 

Dear, Why are you still struggling with this problem? Try the following expression, it may surprise you.

(((?<=\d|\/|^\s)(_?[A-Z]+[A-Z\d_]+?)(?=_20))|(\.[A-Z]+?$))

flying008_0-1663748771599.png

 

*********

If this answer is what you want, please mark it as solution to help more people.

Labels
Top Solution Authors