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

Removing a leading zero that's between a negative symbol and the decimal

kas
8 - Asteroid

Hello All,

 

Having trouble figuring out regex as a fix for this, unless there's an easier way.

This is what I have:            This is what I'd like:

-0.5100                               -.5100
-0.9800                               -.9800
-0.6900                               -.6900
-0.0700                               -.0700
-0.2600                               -.2600
-0.0800                               -.0800
-0.2400                               -.2400
-0.8100                               -.8100
-0.0800                               -.0800
NONE                                 NONE
-0.5000                               -.5000
5214.3700                          5214.3700

 

Thanks in advance!

Kim

4 REPLIES 4
Sami_Fox
5 - Atom

If it is a string already, REGEX_Replace([Col1], '-0.', '-.') would work but I bet there is a cleaner way!

kas
8 - Asteroid

@Sami_Fox - Worked like a charm, thank you!

binu_acs
21 - Polaris

@kas One way of doing this with the Replace function

 

binuacs_0-1659649485983.png

 

kas
8 - Asteroid

@binu_acs  - that's a nice clean simple way too...thank you!

Labels
Top Solution Authors