Extract the number at the end of a string
var re = /[a-zA-Z]+([0-9]+)/; var result = re.exec("portsConfiguration23"); console.log(result[1]);