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.
SOLVED

RegEx Tool

CsmithData31
7 - Meteor

Hello! 

 

I have a text file that I am having trouble parsing out a file using the RegEx tool. I am able to parse out date and reference using the following regex but having trouble with Ful name and remaining columns.

(\d{2}/\d{2}/\d{4})\s(\<\w+\>)\s+

 

Sample text file attached. 

 

CsmithData31_0-1680205944372.png

 

13 REPLIES 13
flying008
15 - Aurora

Hi, @BS_THE_ANALYST 

 

I just only follow sample table picture of @CsmithData31  , so , If  @CsmithData31  can give a cleaning output table for want, then i will be adjust the regex expression to catch it.

OllieClarke
15 - Aurora
15 - Aurora

In terms of writing a RegEx to parse the data, I think it's much easier if you reverse the string before parsing it, as the easier structured bits are at the end of the string

([-\.\d]+)\s*(\d+)\s*(\d+)\s*(\d+)\s*(\d+)\s*(\u+)\s*(\u+)\s*(.*?)\s{2,}(\u.+?\u)\s*(\w+)\s*(\d{4}/\d{2}/\d{2})

 

OllieClarke_0-1680262360456.png

but there are already solutions in this thread - just throwing in my oar

 

CsmithData31
7 - Meteor

haha tell me about it!

binuacs
21 - Polaris

@CsmithData31 Another way of doing this is by reading the file Flat ASCII and use split by fixed length option

 

binuacs_0-1680274206835.png

 

binuacs_1-1680274350615.png

 

 

Labels
Top Solution Authors