Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

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
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. 😁

Labels
Top Solution Authors