Answers for "js match any number string"

2

js match any number string

const match = 'some/path/123'.match(/\/(\d+)/)
const id = match[1] // '123'
Posted by: Guest on June-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language