We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Replace '\' with '\\'

Cindy Sim
Tera Expert

I need to replace '\' with '\\'. How can we do it? Currently I am using :

replace("\", "\\"));
10 REPLIES 10

Trupti94
Kilo Sage

Hi @Cindy Sim ,

 

can you please try below function

replace(/\\/g, "\\\\");

 

Thanks,

Trupti