var abc = 'slovo2_1850', matches = abc.match(/(\w+?)(\d+)_(\d+)/); alert(matches[1]); alert(matches[2]); alert(matches[3]);