Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Parsing with regex

dataminerchris
7 - Meteor

Hello,

I am trying to parse some article numbers that have a similar structure, but I have forgotten the basics of regex groups. The string I wish to decompose is of the form "SUPR5 VALLEY OAK 997D NHMN 5000 ST28" (5 alphanumeric, space, some words of only letters, space, 4 alphanumeric, 4 letters, 4 digits, 4 alphanumeric)

 

I have tried the following "(\w+) (\D+) (\w4) (\D) (\d) (\w4) " with the intention of eliminating groups 4 and 6 in a later stage. I selected "Parse" from the "regex" parse tool. The columns all come out with NULL.

 

What are the basic mistakes i am making ?

 

Thanks for help.

6 REPLIES 6
mot
11 - Bolide

Hi @dataminerchris ,

 

You can try:

(.*) (.*) (.*) (.*) (.*) (.*) (.*)

I hope this helps. Best.

mot
11 - Bolide

Hi @dataminerchris ,

 

Please see the attached workflow. Best.

dataminerchris
7 - Meteor

Hi there

 

thank you very much : it works great !

 

I guess I was trying to make it too complex...

 

all the best

Qiu
21 - Polaris
21 - Polaris

@dataminerchris 

Thank you for giving clear definition.

0309-dataminerchris.PNG

dataminerchris
7 - Meteor

Hello Qiu,

 

thank you very much : this indeed captures the irregular structure of central words section (there are not always the same number of words !)

 

Great help.

 

have a nice rest of day

 

 

Qiu
21 - Polaris
21 - Polaris

@dataminerchris 

Glad to help and you too have a nice day!😁

Labels
Top Solution Authors