Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Extract a substring from the Input File Name

pthekko
5 - Atom

Dear Community

 

I'm trying hard to understand how to do this. As my input file name is too long, I want the output file name to have some strings from the original file name. "FileName" is available.

 

Should I use RegEx tool or Regex in Formula?

 

Input file name will be: VK-29698-AA36718 PT-210120-21687 -E L1-DB1131693-PLG_Result-DB-DeepDiveScanX_2021-02-15_070319.xlsx

Output file name should look like: PT-210120-21687 DeepDiveScanX_2021-02-15_070319.xlsx

 

Conditions here are

- there will be always "PT" followed by "-", following by date (always 6 numbers) followed by "-", followed by any length of numbers. e.g.PT-YYMMDD-n*

- the text DeepDiveScanX will be also there and the rest should be until the file type extension. So basically DeepDiveScanX until the dot

 

Thanks a lot

2 REPLIES 2
messi007
15 - Aurora
15 - Aurora

@pthekko,

 

Please see below:

 

messi007_0-1614874504625.png

Attached the workflow,

 

Hope this helps!

Regards,

pthekko
5 - Atom

yep that worked! Thanks for quick reply!

Labels