I have the following problem, in my replace code I need to found a hole thing, lets say :Hello: and the idea is to find all the word, the full word, and change only the ";" but I am not searching a replacement for :, for all of it, like a wildcard, like a * in CSS, for now I have this
var p = document.querySelector("#div1").innerText
document.write(p.replace(/(hi\[\'*)/g, 'hi(\''));
My idea is to find something than is like /(hi\[\'*\'\])/g
But this exactly wont work
So the result would change from
hi['world']
to
hithere('world')