The CreatorCon Call for Content is officially open! Get started here.

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
Kilo Sage

Hi @Cindy Sim ,

 

can you please try below function

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

 

Thanks,

Trupti