Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Remove unwanted expressions

BautistaC888
8 - Asteroid

Hello,

I have to clean up a .txt and i need to remove unwanted expressions.
I need to remove all expressions that contains characters and expressions like dd.dd.dd
Here is an example,
Input:

BautistaC888_0-1624962341859.png

Expected output:

BautistaC888_1-1624962401527.png

Thank you.

3 REPLIES 3
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @BautistaC888 

One way is to use the regex match. The regex syntax can be something like this

.*[^0-9].*||\d\d\.\d\d.\d\d

https://help.alteryx.com/current/designer/regex-tool

    • Match: Append a column containing a number: 1 if the expression matched, 0 if it did not.
      • Column name for match status: Provide a name for the appended column.
      • Error if not Matched: Select to generate an error if the expression and string do not match to end the workflow processing.
 
PedrodeOl
9 - Comet

Hi @BautistaC888,

 

Use the regex match function in formula:

 

([0-9.,]+) = get the your figures

(\d{2}\.\d{2}\.\d{2}) = remove the pattern dd.dd.dd

 

regards,

apathetichell
20 - Arcturus

In formula tool:

REGEX_Replace([Exempted],"([a-z\s]+|\d{2}\.\d{2}\.\d{2})","")

 

See attached where I wrap it in a multi-field formula and convert your field to a number format... Do you need visible commas?

Labels
Top Solution Authors