This will alert 23.
alert(parseInt(\'23 asdf\'));
But this will not alert 23 but alerts NaN
alert(parseInt(\'asdf 23\'));
var num = +('asd98'.replace(/[a-zA-Z ]/g, ""));