\d+Copier
\d+
This regex pattern \d+ will match any sequence of one or more digits (0-9).
const pattern = /\d+/g; const testString = 'The number is 42'; const numbers = testString.match(pattern); console.log(numbers);Copier
const pattern = /\d+/g; const testString = 'The number is 42'; const numbers = testString.match(pattern); console.log(numbers);