Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
talendtester
Creator III
Creator III

replaceAll - Not working for numbers?

I am trying to remove numbers from the myNumbers column which is a String but I am getting the error "java.lang.NullPointerException".

 

My tMap looks like this:

row3.myNumbers.replaceAll("[0-9]","").trim();

 

My sample file:

myLetters,myNumbers
abc,A123
def,B456
hij,C789
klm,D010

 

Any ideas? 

Labels (2)
1 Reply
Anonymous
Not applicable

Need to check if there exist null value in this column, you can change the expression to:
row3.myNumbers==null?null:row3.myNumbers .replaceAll("[0-9]","").trim()

Regards
Shong