var string = "brendyi-1/acura.html?tv_brand=&tv_model-acura=MDX&tv_year=2008&tv_engine=3.7"; var reSec = /\d+(\.\d+)?/g; var secString = string.match(reSec); alert( JSON.stringify(secString) );