how to get a substring between two strings from a string in js 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: how to get a substring between two strings from a string in js
//I would use indexOf instead of lastIndexOf, to find the first occurrence of the string