js str cut code example
Example 1: short string javascript
short = long.replace(/(.{7})..+/, "$1…");
Example 2: cut string from string javascript
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123
short = long.replace(/(.{7})..+/, "$1…");
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123