Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Extract Text only

JDong
8 - Asteroid

Hi,

 

Please refer to the below table. I want to create a lookup 

 

6.100 Orange
6.110 Mango
6.120 Mango and Oranges
6.130 Kiwi
6.140 Doughnut with cream
6.150 Salad
6.160 Blueberry
6.170 Raspberry
6.180 Muskmelon
6.200 Salad with Cream / Salad with Meat
    Watermelon
Banana
6.230 Grapes with Strawberry and Pineapple

 

I only need to extract the text here so the final lookup needs to be as shown below

 

Orange
Mango
Mango and Oranges
Kiwi
Doughnut with cream
Salad
Blueberry
Raspberry
Muskmelon
Salad with Cream / Salad with Meat
Watermelon
Banana
Grapes with Strawberry and Pineapple

 

Please help with your thoughts.

 

Thanks

13 REPLIES 13
Emil_Kos
17 - Castor
17 - Castor

Hi @JDong,

 

I would suggest going with data cleansing tool + formula tool. 

 

Emil_Kos_1-1599738454489.png

 

 

Please let me know if it was helpful. 

JDong
8 - Asteroid

Thanks...but that does not provide me the desired output.

 

Please refer to the output format needed

Emil_Kos
17 - Castor
17 - Castor

Hi @JDong,

 

Apologies if I am missing something obvious but I checked in excel and the only difference is the sequence of the positions but the output is exactly the same.

 

Can you guide me where is the difference so I can help you out with it? 

 

Emil_Kos_0-1599738966647.png

 

grazitti_sapna
17 - Castor

Hi @JDong , try this if it works for you.

grazitti_sapna_0-1599738993236.png

 

Thanks.

Sapna Gupta
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @JDong,

 

I would go with a formula to replace the parts not needed:

 

Trim(ReplaceChar(REGEX_Replace([Header], '\d', ''),'.',''))

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

JDong
8 - Asteroid

Hi @Jonathan-Sherman 

 

Thanks..is there a free tool that generates the REGEX based on a text pattern ?

 

Please advise

 

 

grazitti_sapna
17 - Castor

@JDong  Another alternate solution. I hope this helps too.

grazitti_sapna_0-1599739210691.png

 

Sapna Gupta
vizAlter
12 - Quasar

Hi @JDong —  You just need to add a Formula tool using the expression below:

 

 

 

 

Trim(REGEX_Replace([Field1], "^[\d+.,]+\s", ""))

 

 

 

 

vizAlter_1-1599739472067.png

 

vizAlter_0-1599739440470.png

 

Also, you can try "RegEx" tool from "Parse" ribbon tab for the same expression (above) with "Replace" Output Method.

"RegEx" tool is very easy to write the expressions as comes with short info about the operations you want to select.

 

If it resolves your query Please mark it "Solved" or "Solved" with a Like. This will help other users find the same answer/resolution.  Thank you.

JDong
8 - Asteroid

Thanks all of the above helps !

 

One question, there is a text 

 

6.822-823 Watermelon/ -apple 

 

Output should be

 

Watermelon/ -apple 

 

This is still not getting fixed using the REGEX. Any help here ?

 

 

 

Labels