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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
agentgill
Contributor
Contributor

Issue replacing double quotes in long string

Hello,
I am trying to remove double quotes from a long string using the following in a tMap
StringHandling.CHANGE(row2.LONGNOTES,"\""", "")
Expression builder is giving compilation error when I try to test the expression.
Any ideas?
Thx
Labels (2)
8 Replies
Anonymous
Not applicable

Hi
Try this expression:
StringHandling.CHANGE(row2.LONGNOTES,"\"\"", "")

Shong
Anonymous
Not applicable

Hi team

I am new with talend, I am trying to replace the double quotes with blank string, I tried below expressions in tMap 

StringHandling.EREPLACE(RemoveXXX.Org_Id,"\"","")
StringHandling.EREPLACE(RemoveXXX.Org_Id,"\"\"","")
StringHandling.CHANGE(RemoveXXX.Org_Id,"\"","")
StringHandling.CHANGE(RemoveXXX.Org_Id,"\"\"","")

 

but all above four not working, kindly help on priority

TRF
Champion II
Champion II

Did you try this one:
RemoveXXX.Org_Id.replaceAll("\"\"", "")

(maybe you will have to replace \ by \\)
PhilHibbs
Creator II
Creator II

In the regular expression, you need this: \"
So in a Java string, you need to escape the slash, and you need to escape the quotes
So the expression needs to be "\\\""

RemoveXXX.Org_Id.replaceAll("\\\"", "");
Anonymous
Not applicable

Hi TRF,

 

Thanks for your quick response, 

 

I have tried below things , check them with result 

 

RemoveXXX.Org_Id.replaceAll("\"\"", "") - Not Worked

RemoveXXX.Org_Id.replaceAll("\"", "") - Not Worked
RemoveXXX.Org_Id.replaceAll("\\"\\"", "") - Given below error
Detail Message: Syntax error on tokens, delete these tokens

 

What is wrong going on processing..


DoubleQuotesRemoveIssue.PNG
Anonymous
Not applicable

Sorry but RemoveXXX.Org_Id.replaceAll("\\\"", ""); this is also not worked

TRF
Champion II
Champion II

Can you share a sample dataset?
Anonymous
Not applicable

Hi Team

 

The issue is resolved after debug, It was mapping issue I was using previous to previous tmap output to the current  map field

 

Thanks for your support