Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

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
Top Solution Authors