Alteryx Designer Desktop Discussions

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

Grouped Regex not parsing from and to concatenated cell in spreadsheet

datanow
6 - Meteoroid

I am having some peculiar behaviour with grouped regex parsing a concatenated cell with semicolon delimiters from a spreadsheet and into a new spreadsheet.  

I have attached the file in case there is supposed to be different settings, regex definitions, etc.INPUT SPREADSHEETINPUT SPREADSHEETHere is the regex section:EIGHT FIELDS TO BE PARSEDEIGHT FIELDS TO BE PARSED

 

 And finally the output spreadsheet section:

OUTPUT SPREADSHEETOUTPUT SPREADSHEETI need the concatenated cell to be parsed out until it is empty regardless of how long the concatenated strings are.  

I am attaching the alteryx file and the input and the output spreadsheets. 

Thank you in advance for you assistance :)

 

UPDATE: 

WOW the community here is amazing - - thank you @Bob_Blackey and @Philip - - the assistance is greatly appreciated.

 

I see I did not give enough detail in the original post, my apologies...

 

The data is concatenated without nulls (and without the delimiters that should mark nulls).

The data will always be in the format of the eight fields shown in the regex.

Other than the contact name, any field may (or may not) be missing at any time, so correcting the regex definition (below) should minimize the processing steps since it will produce one record at a time.

 

(\^.+$);(\^.*$);(\^d+\s);(^.*,\s\d{5}$);(\^\(\d{3}\)\s\d{3}\-\d{4}\(p\)$);(\^\(\d{3}\)\s\d{3}\-\d{4}\(m\)$);(\^\(\d{3}\)\s\d{3}\-\d{4}\(f\)$);(\^\w+\@\w+.\w+$)

 

I have semicolons between the named groups now and it is not working.

Is there something else I should be putting between the named groups in the regex line (to denote the semicolon delimiters) while the concatenated data is being parsed?

 parsing_eight_fields_closeup.jpg

 

 

 

 

Also, is there a way to debug where the regex is failing within this multi-field parsing module?

 

Hope that clarification helps...

 

 

 

 

 

10 REPLIES 10
SophiaF
Alteryx
Alteryx

Hi Richard - for the Select tool, I just manually configured it. I just unchecked a few unnecessary fields and renamed two; you probably could uncheck a few more if need be. For the Regex - practice makes perfect! I personally like "testing" my regex statements using the Formula tool and the REGEX_Match and REGEX_Replace functions because you get more visibility than in a Regex parse tool when the Regex doesn't match. As you saw in the Regex parse tool, if any part of your Regex does not match, the entire column(s) is returned as null. Since we did the regex in a Formula tool here, you can see when things are working.

 

For example, here we see that the regex for the phone is working, but the address doesn't seem to match. Now we just have to modify that part of the expression.

regex1.jpg

 

I do like The Regex Coach for building out more complicated expressions - just my personal recommendation :)

Sophia Fraticelli
Senior Solutions Architect
Alteryx, Inc.
Labels