Contact: aviboots(AT)netvision.net.il
43,871 questions
57,242 answers
573 users
function extractDigits(str: string): string { return str.replace(/[^0-9]/g, ""); } const str = '5 type8script 9001 c c++ 17'; const digits: string = extractDigits(str); console.log(digits); /* run: 58900117 */