In javascript, what is the best way to parse an INT from a string which starts with a letter (such as \"test[123]\")? I need something that will work for the example below.
parseInt(input.replace(/[^0-9-]/,""),10)