Here is my string
string str = "++10+++10++++10";
and I have tried this regex
str.replace(/(\+\+||\+\+\+||\+\+\+\+)/g, '+');
how to replace these plus are in one plus like
'+10+10+10'
.help me.
Here is my string
string str = "++10+++10++++10";
and I have tried this regex
str.replace(/(\+\+||\+\+\+||\+\+\+\+)/g, '+');
how to replace these plus are in one plus like
'+10+10+10'
.help me.