Alteryx Designer

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

RegEx Replace

Highlighted
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!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@RMcB ,

 

 why not just:

 

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

 

 cheers,

 

mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
Alteryx
Alteryx

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

 

echuong1_0-1593200493745.png

 

Highlighted
6 - Meteoroid

Thank you!! 

Labels