So entfernen Sie Text aus einer Zeichenfolge in Javscript
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123
Mobile Star
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123
var str = "That is like so not cool, I was like totally mad.";
var cleanStr = str.replace(/like/g, "");//replace every "like" with blank ""