Answers for "searching for number in str.match in javascript"

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 "searching for number in str.match in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language