regex match all numbers in string javascript code example
Example 1: just number regex js
// https://regex101.com/r/qyq3PG/1
// or
/^[0-9]*$/
Example 2: js match any number string
const match = 'some/path/123'.match(/\/(\d+)/)
const id = match[1] // '123'