replace string pattern(<, >) in a text using javascript

43 Views Asked by At

I had a text BODY BUTTER (<)&(>) CHERRY - 200ML_XM A0 2208. I try to replace (<)&(>) with &.

var str = "BODY BUTTER (<)&(>) CHERRY - 200ML_XM A0 2208";
str.replace(/\(<\)|\(>\)/gi,'');

It is not working. Is there anyway to get this work?

0

There are 0 best solutions below