Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trimming leading zeroes

How to get a decimal from a string after trimming of leading zeros and non-numeric characters.

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Can you give a typical example of the String you want to change?

Anonymous
Not applicable
Author

Let the string be like

000AB1234

001234AB

I need the output as

1234

1234

akumar2301
Creator III
Creator III

Integer.parseInt(text.replaceAll("[^0-9]", ""))
Anonymous
Not applicable
Author

I tried Integer.parseInt(input.replaceAll("[^0-9]", "")) in tjavarow

But I'm getting null in my output

manodwhb
Creator III
Creator III

@Matthew , below one should also work.

 

Integer.parseInt(row1.col1.replaceAll("[^\\d.]", ""))