Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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