[Solved] How to remove the character form string using jQuery? [duplicate]


A simple String.replace with regex /[a-z]/ig can do!

var str = "avc234jw6";
var no = parseInt(str.replace(/[a-z]/ig, ""));

console.log(no);

solved How to remove the character form string using jQuery? [duplicate]