Alteryx Designer Desktop Discussions

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

Splitting Data with Inconsistent Number of Characters

Zenn6420
7 - Meteor

Hello guys,

 

As a newbie to Alteryx, here I am again asking another question. I am exploring how to use RegEx function but I'm having difficulty. My data involves splitting Column 1(Release date) and Column 2 (Duration of a song).

For example:

Record 1: 7/24/2020141 = Should be split to 7/24/2020 and 141

Record 2: 7/3/2020190 = Should be split to 7/3/2020 and 190

If I use expression such as "(.........)(...)", this causes Null values in Column 1 and 2 since the Record 2 only contains 8 digits for the release date. How should I format my expression?

 

Appreciate any response.

Thank you!

 

 

4 REPLIES 4
MilindG
12 - Quasar

MilindG_0-1664559049196.png

See if this works for you.

 

Zenn6420
7 - Meteor

@MilindG oh my gosh you're a lifesaver. this totally worked! how do you come up with this expression? 

MilindG
12 - Quasar

@Zenn6420 I have recently just learned the regex tool. Regex101.com is a great place to practice some expression.

Zenn6420
7 - Meteor

Oh, I should check that out. Thank you so much!

Labels