How can I replace multiple (++++++) signs with blank space?
Example: var string = "+++++++++++++++++";
How can I replace multiple (++++++) signs with blank space?
Example: var string = "+++++++++++++++++";
var string = "+++++++++++++++++";
string = string.replace(/\+*/g, '');
console.log(string.length);
const str = 'abc++++++def++++frberbf++fsvsf';
const newstr = str.replace(/(.)\+{2,}/g, ' ');
console.log(newstr);