Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex parsing

Inquisitive1
5 - Atom

Hi All, and i hope you have a great Friday. 

 

I would like a help with regex syntax (i am fairly new to this and it's now hurting my head). 

 

I have the following data set: 

"Mo, Tu, We 10:00-18:00 Th 10:00-20:00 Fr 10:00-18:00 Sa 09:00-17:30 Su 11:00-17:00",
"Mo, Tu, We, Th, Fr 10:00-18:00 Sa 09:00-17:30 Su 11:00-17:00",

etc in any combinations of days/hours

 

 

Desired outcome:

MoTuWeThFrSaSu
10:00-18:0010:00-18:0010:00-18:0010:00-18:0010:00-20:0009:00-17:3011:00-17:00
10:00-18:0010:00-18:0010:00-18:0010:00-20:0010:00-18:0009:00-17:3011:00-17:00

 

Which is the best method ? Tokenise? Parse?

How would you quickly tackle the "Different lengths"?

Could someone help me please?

 

Thanks, 

 

2 REPLIES 2
Ladarthure
14 - Magnetar
14 - Magnetar

Hi @Inquisitive1,

 

here is a way to do it. you would need to use RegexReplace formulas to do so! (find the solution attached!)

Inquisitive1
5 - Atom

Brilliant! Thank you very much. 

Labels
Top Solution Authors