var a = "123(456)"; var cur = Number(a.split(/[^0-9]/g)[0]); var max = Number(a.split(/[^0-9]/g)[1]); alert(cur);alert(max);