I have having some issues trying to replace a certain group of special characters in a string. Specifically
str = 'This is some demo copy[300]this should remove the brackets and the copy 300.'
I have been trying to replace it with
str.replace(/[300]/g, "<br />");
with no such luck. I seem to be getting hung on with the brackets[] that also need to be removed. I know that I can remove them individually, and then replace the 300 but I need to replace the set together.
It should return:
This is some demo copy
this should remove the brackets and the copy 300.
Any advice would be extremely appreciative as I am relatively new to regular expressions.
Thanks in advance!