I want to remove all occurrences of substring = . in a string except the last one.
.
E.G:
1.2.3.4
should become:
var s='1.2.3.4';
s=s.split('.'); s.splice(s.length-1,0,'.'); s.join('');
123.4