Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript validate string with 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
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #validate #string #regex
ADD COMMENT
Topic
Name
9+9 =