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

Parsing text

TarunDeep
8 - Asteroid

Hi,

How can we break below string into 4 and take out dates and ID (R123456) from it. Not able to do it using RegEx

 

"X......................................................................................r.n...Advice..................Period...07.05.18..31.05.18......r.n.......R123456..........................Date.....29.05.2018....."

7 REPLIES 7
MarqueeCrew
20 - Arcturus
20 - Arcturus

@TarunDeep ,

 

I've used two RegEx tools to tokenize those values.

 

capture.png

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
CharlieS
17 - Castor
17 - Castor

Hi @TarunDeep 

 

I started out by isolating the values from the repeated '.' characters by first replacing repeated "."s with a "|" and then using that "|" to split those value to rows. Now that the values are isolated, RegEx based rules can identify the values you're interested in. 

 

Check out the attached workflow for an example. 

TarunDeep
8 - Asteroid

Thanks for the solution. It worked for first 2 dates, but for the third, it always gives year as 20 ,but year in 3rd date is in full format i.e2019. So it should be 19 instead in Date3.

fmvizcaino
17 - Castor
17 - Castor

Hi @TarunDeep ,

 

My solution looks really alike @MarqueeCrew , so credits to those who came first. 🙂

Only adding the part to remove 4 digit year.

 

Best,

Fernando Vizcaino

MarqueeCrew
20 - Arcturus
20 - Arcturus

@fmvizcaino,

 

Thanks for the call-out.  While it is up to @TarunDeep as the originator of the post to determine acceptance of a solution, the value to community is the breadth of answers.  Alteryx allows for many responses to be marked as "Accepted Solution".  Alteryx doesn't have a single answer.   Many roads lead to Rome.  I do appreciate the likes and solution acceptance actions.  They make my time seem valued.  We stopped to lend a hand and it makes me know that my time was valued when I get those notifications.  If it were up to me, I'd mark all of the posts as solves.

 

Hopefully, Alteryx engineers a change to community to encourage people to add solutions to "solved" challenges and can curate more discussions that help future users.  This post will undoubtedly be read from a "newbie" in the future and they will focus on the "SOLVE".  With more SOLVES they'll get more help.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
ephij
9 - Comet

great solution

CharlieS
17 - Castor
17 - Castor
@MarqueeCrew wrote:

Thanks for the call-out.  While it is up to @TarunDeep as the originator of the post to determine acceptance of a solution, the value to community is the breadth of answers.  Alteryx allows for many responses to be marked as "Accepted Solution".  Alteryx doesn't have a single answer.   Many roads lead to Rome.  I do appreciate the likes and solution acceptance actions.  They make my time seem valued.  We stopped to lend a hand and it makes me know that my time was valued when I get those notifications.  If it were up to me, I'd mark all of the posts as solves.


My use of RegEx, even in this solution, is a result of learning from @MarqueeCrew, et.al. The diversity of solutions we all have the ability to provide and learn from is what keeps me coming back to the Community again and again. 

 

 

Labels