javascript get string between range code example
Example 1: javascript get text between two words
//Gets the part of the string inbetween the : and the ;
var part = str.substring(
str.lastIndexOf(":") + 1,
str.lastIndexOf(";")
);
Example 2: cut string from string javascript
var ret = "data-123".replace('data-','');
console.log(ret); //prints: 123