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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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