Alteryx Designer Desktop Discussions

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

How to eliminate continuous punctuation

AKPWZ
8 - Asteroid

Hi, 

Please suggest me a method/way that allows me to eliminate all punctuation (any type) if it appears more than once in a column.
For instance, K................................................... h........................a........................................n.......................................... I................................m............................................................d......................................................
In this instance, I want to maintain only one dot and eliminate the others, thus the result should be  => K.h.a.n.I.m.d.

Thank you!

2 REPLIES 2
DataNath
17 - Castor

Hey @AKPWZ, here's one way you could look to handle this. We're just looking for a pattern of 2 or more punctuation characters and just replacing that with the first.

 

REGEX_Replace([Input], '([[:punct:]]){2,}', '$1')
Qiu
21 - Polaris
21 - Polaris

@DataNath 
Thanks for letting me that [:punct:] can represent the punctuations. 😁

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels