Alteryx Designer Desktop Discussions

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

RegEx

SylviaK
8 - Asteroid

Hi 

 

I am trying to get the date out of the comments column using RegEx. 

 

SylviaK_0-1611755714059.png

 

 

I used this expression. but it doesn't seem to work. What am I doing wrong?

 

SylviaK_1-1611755773621.png

 

Many thanks, 

Sylvia

3 REPLIES 3
Ladarthure
14 - Magnetar
14 - Magnetar

Hi @SylviaK,

 

I used this regex, may not be the best but it worked on my side : 

 

(\w+\s\d+\,\s\d{4})\s.+

 

Hope it helped!

AshleyL
Alteryx
Alteryx

Hi @SylviaK,

 

I've attached a sample workflow. I would suggest using Parse and then if you want to convert the new separated date into a date data type, you'd use the DateTime tool.

 

If you wanted to use replace, I would uncheck 'Copy unmatched text to output'.

 

Does this help?

Ashley

neilgallen
12 - Quasar

In this case you need to replace the \n with \d to signify digits. The rest of the expression should work!

Labels