Get Substring between two characters using javascript

You can try this

var mySubString = str.substring(
    str.indexOf(":") + 1, 
    str.lastIndexOf(";")
);

You can also try this:

var str = 'one:two;three';    
str.split(':').pop().split(';')[0]; // returns 'two'