Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

RegEx Tool remove leading zeros

mstoler
8 - Asteroid

Hello,

 

I am using the RegEx tool to remove leading zeros.  I am using the expression below,

 

(^[0]+)

 

It seems like the RegEx tool requires the left and right parenthesis.  I just wanted to check because it seems that some RegEx tools will also accept

 

^[0]+

 

Thanks for the clarification.

 

Michael

 

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

@mstoler ,

 

You should use the string function, TrimLeft().

 

TrimLeft

TrimLeft(String, y): Removes character in the string (y) from the beginning of the string (String). Y is optional and defaults to trimming white space.

 

 

TrimLeft([Field],"0") 

 

 

This will remove leading zeroes.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
mstoler
8 - Asteroid

Hello,

 

Thanks I will accept the solution but I also wanted to learn about regular expressions.

 

Just a question it seems that Alteryx requires parenthesis around the regular expressions?

 

Michael

 

Labels