var str = '?aaa=1&bbb=текст&min=10&max=30&ccc_9=856&ccc_110=983'; var reg = /&ccc_(\d+)=/ig; var numberArr = []; while (number = reg.exec(str)){ numberArr.push(number[1]); } alert(numberArr);