Answers for "get first match regex javascript"

2

javascript regex for firstname

var nameRegex = /^[a-zA-Z\-]+$/;
Posted by: Guest on May-02-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 "get first match regex javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language