let str = "My string is:abc;"; var mySubString = str.substring( str.indexOf(":") + 1, str.lastIndexOf(";") ); // mySubString = "abc"