Answers for "nodejs check if string matches regex"

0

nodejs check if string matches regex

console.log(/^([a-z0-9]{5,})$/.test('abc1')); // false

console.log(/^([a-z0-9]{5,})$/.test('abc12')); // true

console.log(/^([a-z0-9]{5,})$/.test('abc123')); // true
Posted by: Guest on August-06-2021

Code answers related to "nodejs check if string matches regex"

Code answers related to "Javascript"

Browse Popular Code Answers by Language