Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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!

binuacs
21 - Polaris

@kas One way of doing this with the Replace function

 

binuacs_0-1659649485983.png

 

kas
8 - Asteroid

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

Labels
Top Solution Authors