JavaScript obtient une chaîne entre deux caractères
const oldString = 'John1Doe2'
const stringBetweenCharacters = oldString.match(/1(.*?)2/i)[1] //Doe
Tom Bomb
const oldString = 'John1Doe2'
const stringBetweenCharacters = oldString.match(/1(.*?)2/i)[1] //Doe
let str = "My string is:abc;";
var mySubString = str.substring(
str.indexOf(":") + 1,
str.lastIndexOf(";")
);
// mySubString = "abc"