Regular Expressions 101

Community Patterns

atleast 1 character and 1 number

1

Regular Expression
ECMAScript (JavaScript)

/
^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[a-zA-Z\d#?!@$%^&*+`~._\-\\\/;'"<>{}[\]]).{6,}$
/

Description

This regex checks if atleat a character and a number is there regardless of any special characters in the list

Submitted by Akshay Shah - 8 years ago