Alteryx Designer Desktop Discussions

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

RegEx with timestamp (hh:mm) as delimiter

kherty
7 - Meteor

I had some brief training with RegEx when I was at Inspire, but I'm a total novice.  I have Googled to try and solve this and cannot figure out.  Can somebody assist?

 

I have a V_String field that I need to parse out the contents.  Essentially it's a planed schedule and I'd like to parse it into columns/rows:

 

10:15  TEST 1 (15 MIN) 10:15 TEST 2 (15 MIN) 10:15 TEST 3 (15 MIN) 11:00 TEST 4 (15 MIN) 12:00 PROCEDURE 1 (60 MIN) 

 

I need to parse out based on the delimiter being the HH:MM so I would have

 

COL1                 COL2                            COL3

SCHED TIME    PLAN                            EXP DURATION

10:15                 TEST 1                          15

10:15                 TEST 2                          15

10:15                 TEST 3                          15

11:00                 TEST 4                          15

12:00                 PROCEDURE 1            60    

 

 

Can anybody assist to show me the best way to deal with this?

 

Thanks!!

 

2 REPLIES 2
hlmess
7 - Meteor

Here's a method that works but there's probably a cleaner way to handle the regex expression. This one's pretty reliant on a consistent text format.

clipboard_image_0.png

Regex Parse 1:   \d+:\d{2}\s+\l+\s+\d+\s+\(\d+\s+\l+\)

clipboard_image_1.png

Regex Parse 2:  (\d+:\d{2})\s+(\l+\s+\d+)\s+\((\d+\s+\l+)\)

clipboard_image_2.png

Result:

clipboard_image_3.png

kherty
7 - Meteor

Thanks!  That looks like it will work!  I appreciate the quick response!

Labels