We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex: Remove unwanted expressions

BautistaC888
8 - Asteroid

I need a Regex to remove unwanted expressions from a document.
There are two unwanted expressions for example:

- "30.03.21"
- or any expression that contains letters

I give you a workflow as an example.
Thank you

5 REPLIES 5
DawnDuong
13 - Pulsar
13 - Pulsar

Hi @BautistaC888 

Do you mean that you want to remove from a string 1) all alphabets and 2) anything that has the pattern like dd,mm.yy format?

Dawn 

BautistaC888
8 - Asteroid

Yes,

- All alphabets.
- And dd.mm.yy expressions.

BautistaC888
8 - Asteroid

Yes,

- Remove all that contains alphabets.
- and expressions with formats dd.mm.yy

Thank you

BautistaC888
8 - Asteroid

I found a way to eliminate the dates using the datetime tool and an if formula. There must be a better way to do it, but its what i can do as a novice. Thank you.

Maskell_Rascal
13 - Pulsar

Hey @BautistaC888 

 

This formula will work for you. 

ToNumber(REGEX_Replace([Exempted], '(\d{2}\.\d{2}\.\d{2})|([a-zA-Z])', '0'))

 

Maskell_Rascal_0-1624975226014.png

 

Cheers!

Phil

 

Labels
Top Solution Authors