Alteryx Designer Desktop Discussions

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

Using Regex to Parse

jenner85
8 - Asteroid

Hi - I am looking to parse a date out of a field:

 

8549-P_202008-RPT_TMS00507~20200804_0

 

I want to change the field to just the 20200804 part. I am sure there are many ways to do this, I am trying to get more familiar with Regex. 

 

Thanks!

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @jenner85 I mocked up a workflow to show a couple of ways you can do this. Let me know what you think?

vizAlter
12 - Quasar

Hi @jenner85 — Try this solution... use it in "RegEx" tool for Parse output method, like below:

 

(?!.*~)(\d{8})

 

In the 1st Group ( ), excluding the text before ~ and including ~ as well, then picking up the digits till 8 in the 2nd Group.

 

vizAlter_0-1600806597485.png

 

 

Please mark it "Solved" or "Solved" with a Like if it resolved your query. This will help other users find the same answer/resolution.  Thank you.

Labels