Community Halloween is live until October 31st! Complete any 2 quick activities to earn the 2025 Community Halloween badge. Feeling brave? Check out the activities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex replace multiplied delimiters

Kingazawora
8 - Asteroid

Hello

 

I have an expression that looks like this:

 

Anna / / / / / / June

Anna / / / June

Anna / / / / / / / / December

 

I want to replace multiplied / with just one /.

 

How can I do that with a formula?

 

Thanks:)

5 REPLIES 5
flying008
15 - Aurora

Hi, @Kingazawora 

 

FYI.

 

 

 

 

REGEX_Replace([Txt], '/[\s/]*/', '/')

 

 

录制_2024_10_10_14_41_20_807.gif

 

Kingazawora
8 - Asteroid

Fore more words here: @flying008 

 

Anna Julia Ola / / / / Anna

 

I will have the following output:

 

Anna / Julia / Ola / Anna

 

Whereas I would expect to have: Anna Julia Ola / Anna

 

How this could be amended in formula?

 

Kingazawora
8 - Asteroid

REGEX_Replace([Comments], '[\s/]+/', ' / ')

 

 

binu_acs
21 - Polaris
REGEX_Replace([Data], '[ /]{2,}', '/')

image.png

nagakavyasri
12 - Quasar

@Kingazawora Another way:

 

Screenshot 2024-10-11 144737.png

Labels
Top Solution Authors