function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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,