Hi, i have a problem with a replacement in a javascript code.
The javascript code is this one:
![Replace text in javascript 8td4x83](https://i.imgur.com/8td4x83.png)
u see that the second line
With this code, the text "HTML" is getting replaced by second word "HTML" which is in the span id.
I want to replace the text "[HTML]" (without quotes). I tried this one:
but something is not correct so i get this result:
![Replace text in javascript T4jDzIV](https://i.imgur.com/t4jDzIV.png)
which is the correct code in order to replace
??
The javascript code is this one:
![Replace text in javascript 8td4x83](https://i.imgur.com/8td4x83.png)
u see that the second line
- Code:
.replace(/HTML/g,"<span id='HTML'>HTML</span>
With this code, the text "HTML" is getting replaced by second word "HTML" which is in the span id.
I want to replace the text "[HTML]" (without quotes). I tried this one:
- Code:
.replace(/[HTML]/g,"<span id='HTML'>HTML</span>
but something is not correct so i get this result:
![Replace text in javascript T4jDzIV](https://i.imgur.com/t4jDzIV.png)
which is the correct code in order to replace
- Code:
[HTML]
??