Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Parsing Information from a string that is dynamic

livluvlaf4lyf
6 - Meteoroid

I am struggling parsing a long string properly.

******As an FYI Alteryx thought my strings were HTML so I had to add " " around the examples and the field names, which aren't actually there in real life********

I need to pop out the following fields from dynamic string strings that can look like this; 

 

Example 1:

"Proj for ONT Ntwk/Table Prog () from (Olivia Lenox) - D/V only - Various sites, Phones= 7290, Comp Phones= 0"

 

Example 2:

"Proj for DNT Ntwk/Table Prog (MR2923021) from (Jill Lady)- Expansion-Place Center, Floors Affected=1- Seats Effected=48, Circuit=Yes , ConfRm=3, WAPs=0, WIPs=0, Phones=0 ,Comp ConfRm= 0, Comp WAP's= 0, Comp WIP's= 0, Comp Phones= 0"

 

As you can see, literally nothing about the strings are guaranteed. They could have the fields I need to pull which are; 

"ConfRm, WAPs, WIPs, Phones, Comp ConfRm, Comp WAP's, Comp WIP's, Comp Phones"

 

I know I would probably have to do each parsing separately and Im ok with that. The fields don't previously exist in my dataset, so I can create them in a formula tool beforehand or during this process. To clarify, I really only need the value that is after the = sign. I dont need the space but it also wouldnt matter if the space was pulled in. Attached are the two different ways I tried to tackle this but I was not successful as I cannot figure out how to parse dynamically for strings like this.

 

12 REPLIES 12
livluvlaf4lyf
6 - Meteoroid

Just to make sure I also understand this part... You manually added the other fields below description (" ","1", "2",etc) with your manual input tool?  So if I am connecting to a database, I should add in that step with the formula tool before I get to the data cleansing tool right? 

 

406_568_1.25.png

flying008
14 - Magnetar

Hi, @livluvlaf4lyf 

 

Due to the security policy, I can't upload any .yxmd files, now I will send you the tool configuration for reference.

 

录制_2024_05_14_08_09_25_459.gif

sparksun
11 - Bolide

Just change "Split to columns number of columns"  in the regex tool configuration to 10 for your sample data,the warning will disappear.

The specific number depends on your real data.It should be the maximum number of matched item with the regex syntax. 

Labels