Alteryx Designer Desktop Discussions

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

Using Regex to Parse

kiwiontree
6 - Meteoroid

Hi everyone,

I would like to obtain information from the datafile name and tab using the RegEx (Parse) Tool. In particular, I would like to obtain the "month.year" and Sheet name from a document:

 

"...\Hours\KA_04.2020.xlsx|||`CC123456_Sales Customer Service$`"

 

I figured it out how to get the month.Year information --> (\d{2}.\d{4})

But I am struggling to get the information "CC123456" and "Sales Customer Services" from the string.

 

Can anyone help?

1 REPLY 1
MarqueeCrew
20 - Arcturus
20 - Arcturus

@kiwiontree ,

 

 as requested:

 

regex_replace([filename],".*(\d{2)\.(\d{4}.*\'(.*)\$.*",'$1|$2|$3')

 

 this will give you a pipe delimiter result in a formula or you can use regex parse with the expression inside of the double quotes. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels