Как найти номер в строке JS
// To find a number in a string
const str = "sdfh0d5f6"
const result = str.match(/\d+/g)
console.log(result)
// ['0', '5', '6']
Radmehr Aghdam
// To find a number in a string
const str = "sdfh0d5f6"
const result = str.match(/\d+/g)
console.log(result)
// ['0', '5', '6']
the regular expression on looks for the first number character in the string
let numberInString = theString.match(/\d+/[0];