Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Building a Regex Expression

Charity_K_Wilson
10 - Fireball

I really think Regex is going to be the solution, but I'm open to any option.  I'm including a select sample of the comments so you can get an idea of what I'm dealing with.

 

I'm trying to take this comment:

"Incentive Period : 2/25/2021-2/24/2022 , Sequence: 2/3"

 

And get to the fact that this is the 2nd payment in a series of three.  I'm trying to analyze our bonus payments, especially the ones that are promised over a period of time, and understand which payment we are in.

 

So, how do I pluck off just the "2" after the word "Sequence:"?  And how do I do that given the inconsistency of the data?

 

This field is free-form.  Some people have a self assigned format they use to enter the data.  And other people don't.  So I have to use something that is flexible and won't apply to all the data.

 

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @Charity_K_Wilson 

 

You can regex like this

Sequence:? (\d+)/

 

Workflow:

atcodedog05_0-1628608066132.png

 

Hope this helps : )

 

Charity_K_Wilson
10 - Fireball

OH MY WORD!  That worked, and it was so easy.  I knew this had to be very solvable given that I had at least something of a regular expression to it.  I truly appreciate your help.

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @Charity_K_Wilson 

Cheers and have a nice day!

Labels