+ Start a Discussion
JO_DevJO_Dev 

final string contains \

The following code gives me an error because the final character for the string '<img src="data:image\' contains \

How do I fix this?

myLog.EmailHTML__c.replaceAll('<img src="data:image\', '<img src="data:image/');
Best Answer chosen by JO_Dev
Nishad KNishad K
Hi,
Instead of using single '\' use double '\\'
myLog.EmailHTML__c.replaceAll('<img src="data:image\\', '<img src="data:image/');

Regards,