I have a string with sub-string '5+' and it looks like sales/100/5+. I need to remove the sub-string 5+.
Input : sales/100/5+
Demanded output : sales/100
The jquery script is as follows:
var rstring = 'sales/100/5+';
if((splitStr == '5+')||(splitStr == '4-')) {
var key = rstring.replace(new RegExp('/'+splitStr, 'g'),"");
alert(key);
}
Now im getting the result : sales/100+
But desired output is : sales/100