Last updated 4 years ago
Was this helpful?
find any digits through the regular expression
convert process-1 as integer(number)
const getAge = (inputString) => parseInt(inputString.match(/[0-9]/)[0], 10);