regular matching can only be numeric letters, where the start and end match.
let reg2=/ ^ [a-zA-Z0-9] + $/
let reg1=/[a-zA-Z0-9]+/;//
let reg2=/^[a-zA-Z0-9]+$/;//?
console.log(reg1.test(""));//false
console.log(reg1.test("a-"));//true
console.log(reg1.test("13232-3213"));//true
console.log(reg1.test("423432432"));//true
console.log(reg2.test(""));//false
console.log(reg2.test("a-"));//false
console.log(reg2.test("13232-3213"));//false
console.log(reg2.test("423432432"));//true