Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Regex timestamps

oneillp111
9 - Comet

I have a regex expression that parses text for a timestamp in the form of dd/mm/yyyy hh:mm:ss AM/PM.  The expression is as follows:

(\d{1,2}/\d{2}/\d{4}\s\d{1,2}:\d{1,2}:\d{1,2}\s.m)

This works great and I want to get all Time stamps in the string however when there is multiple timestamps, it also returns all the text in between the stamps.  Can anyone help me with this? I want to get the timestamps only.  Example, here is what I currently get from the above expression

9/30/2020 10:36:00 AM This can be any amount of text 9/24/2020 9:10:49 AM

 This is what I am trying to get, 

9/30/2020 10:36:00 AM
9/24/2020 9:10:49 AM

 

1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

If you use the Regex tool in tokenise mode, it would allow you break out all the timestamps to rows.

 

I'd tweak expression to:

\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{1,2}:\d{1,2} [AP]M

 

 Attached example

Labels