1const oldString = 'John1Doe2'
2
3const stringBetweenCharacters = oldString.match(/1(.*?)2/i)[1] //Doe
4
1//Gets the part of the string inbetween the : and the ;
2var part = str.substring(
3 str.lastIndexOf(":") + 1,
4 str.lastIndexOf(";")
5);