In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Remove zeros before 1-9

Crispy131
8 - Asteroid

Hello,

 

I have a column of data that looks like below and I want to remove all the zeros on either side of the dash that are leading zeros. 

 

01-03

05-10

25-07

16-08

04-14

17-20

 

Result I expect:

1-3

5-10

25-7

16-8

4-14

17-20

 

Any help is much appreciated!

5 REPLIES 5
Felipe_Ribeir0
16 - Nebula

Hi @Crispy131 

 

One way of doing this

(^0)|(?<=\-)(0)

 

Felipe_Ribeir0_0-1669334434092.png

 

Crispy131
8 - Asteroid

Worked a treat! Thank you

flying008
15 - Aurora

Hi,@Crispy131 

 

There is a easy way of RegEx expression:

0(?=[1-9])

flying008_0-1669335983726.png

 

Crispy131
8 - Asteroid

So simple thank you!

flying008
15 - Aurora

Hi,@Crispy131 

 

If can help you  get your want, please mark it as a solution for share more. 😁

Labels
Top Solution Authors