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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMap : Java functions 'Ereplace' and 'Change' not working

Hi,
we're trying to use 'Ereplace' and 'Change' functions in expression builder of tMap component, but the result we get when testing it is ',,,,,,' (see screenshot attached).
Did we miss a step with these functions ?
Thx for your answer
EMahe
Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hello,
Actually , the first parameter of this method is a regular expression.
You have to replace "." by "\." to get the correct result.
Regards,
_AnonymousUser
Specialist III
Specialist III

I have the same issue when trying to tmap a phone number from 11.111.1111 to 11-111-1111
Using StringHandling.EREPLACE(row1.HomePhone,".","-")
Gives the result of ---------
Using the "\." gives error Invalid Escape sequence.
Using "/." replaces nothing.
Please advise.
Anonymous
Not applicable
Author

Hello
Try
StringHandling.EREPLACE(row1.HomePhone,"\\.","-")

Best regards

shong
_AnonymousUser
Specialist III
Specialist III

shong,
Excellent! That worked.
Now my question is what special characters require the \\ so they don't confuse tMap
Thanks!
Anonymous
Not applicable
Author

Hi,
Is one better to use in certain circumstances than the other (referring to Ereplace vs. Change)?