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 replace first , but not second

marksyoung73
6 - Meteoroid

Hi,

 

I'm new to REGEX and try to get my head around it.

 

In this example "Hard Rock Cafe International (USA), Inc.,1111-L"

 

How to I replace the , within a text but not a comma before the number starts?

 

thanks

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @marksyoung73 

 

You can try Regex formula like below.

 

 

 

REGEX_Replace([Field1], ",([^\d])", "$1")

 

 

 

Remove all commas which is not followed by number. Comma (,) followed by Non number ([^\d]) is replaced with non number (i,e comma removed).

 

Workflow:

atcodedog05_0-1627922705232.png

 

Hope this helps : )

 

marksyoung73
6 - Meteoroid

This is great. Just wish I could understand the layout a little more.

Any idea the best place to learn this stuff?

Thanks very much

atcodedog05
22 - Nova
22 - Nova
Labels
Top Solution Authors