How to Replace "\" with null or Character?

How to Replace "\" with null or Character?

Hi,
I need to replace slash out "\" character in a string to null or others character.
C_Name
3001.41.MY..AVAIL\SALE
54.MY..AVAIL\SALE
to
C_Name_New
3001.41.MY..AVAILSALE
54.MY..AVAILSALE
Any one can help? I try to use Replace or Change function, but it seem like can detect the "\" character.
Thank You.
Regards
Benjamin
Moderator

Re: How to Replace "\" with null or Character?

Hi,
Try this expression in tMap.
row1.data.replaceAll("\\\\", "")

.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog