I want to replace ^ to ** in js but we try to use str.replace it only replaces a first one and rest string are same
const input = "2^3+4^4";
const replace = input.replace("^", "**");
console.log(replace);
output :
2**3+4^4
but i want
2**3+4**4