In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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

hi2019
8 - Asteroid

Hi

 

I have a Regex formula but I think the punctuation in the column is giving it an extra count - 

 

is this formula correct?

 

REGEX_Replace(ReplaceChar([Name Copy], '. ,', '|'), '\|+', '|')

 

FRHT FIRST CORP. 

 

it reads it as count 4 but it should be 3

 

FRHT/FIRST/CORP/   isnt it countig it like this?

 

I have another one with punctuation but it is reading it correctly 

 

DID C. REORD count 3 

 

or could it be because the ending of these column has approx 7-8 spaces after the last letter? It is messy data and  i have a data cleanse tool to remove extra trailing spaces or does it only account for certain amount of spaces?

 

 

10 REPLIES 10
CPacheco89
6 - Meteoroid

Thank you very much for this and for providing a simpler option! I'll try it out and provide feedback. I initially thought the RegEx tool would be a good option since I didn't want to remove all the question marks in the texts, but only the ones that should be apostrophes. I appreciate you taking the time to share your knowledge with me.

Labels
Top Solution Authors