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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
profuse
Creator
Creator

tMap STRING how to replace ")" with "-"

In tMap, row1.phone contains the value (800)777-1234

 

How do to replace "(" with "" and also replace ")" with "-"

 

So the result should look like 800-777-1234

 

Thanks

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

Please refer below output.

0683p000009M3Ot.png

 

The function is as below.

 

row1.data.replace("(","").replace(")","-")

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

View solution in original post

3 Replies
Anonymous
Not applicable

Hi,

 

Please refer below output.

0683p000009M3Ot.png

 

The function is as below.

 

row1.data.replace("(","").replace(")","-")

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

 

Anonymous
Not applicable

StringHandling.CHANGE(row1.phone,"(","").CHANGE(row1.phone,")","-")

profuse
Creator
Creator
Author

Perfect Thank You!