📅  最后修改于: 2022-03-11 15:01:43.651000             🧑  作者: Mango
// function you can use:
function getSecondPart(str) {
return str.split('-')[1];
}
// use the function:
alert(getSecondPart("sometext-20202"));