Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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