Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

RegEx Replace

RMcB
6 - Meteoroid

Hi everyone, 

 

I have a field called "Accountable User" in a spreadsheet and I need to cleanse a few values. I've never used this function before and need help with the code. 

 

A few names have an unnecessary white space after a hyphen (e.g., Smith- Jackson, Maria). I want to remove the space between the hyphenated last name. 

 

Thank you!

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@RMcB ,

 

 why not just:

 

replace([field], "- ", '-')

 

 cheers,

 

mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
echuong1
Alteryx Alumni (Retired)

You can use a replace statement to remove the instances of "- " and replace it with "-".

 

echuong1_0-1593200493745.png

 

RMcB
6 - Meteoroid

Thank you!! 

Labels