Answers for "javascript match number"

0

javascript match number

str = "hello123!"	
str.match(/(\d+)/)[1]	//Best way to find first matching number in string ;)
Posted by: Guest on October-10-2021
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 match number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language