Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.
SOLVED

Parsing text

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....."

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

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. 

Highlighted
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.

Highlighted
Alteryx Certified Partner

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

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Highlighted
Comet

great solution

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
@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