// To find a number in a string const str = "sdfh0d5f6" const result = str.match(/d+/g) console.log(result) // ['0', '5', '6']