Community Patterns

Community Library Entry

0

Regular Expression
Created·2015-12-12 09:53
Flavor·PCRE (Legacy)

/
(?=.*[A-Z])(?=.*[0-9])(?!.\n)(?!.*\s)(?=.*[!$#+@%&]).{8,}
/
Open regex in editor

Description

(?=.[A-Z]) # must contain 1 uppercase letter (?=.[0-9]) # must contain 1 digit (?!.\n) # must not contain a newline character (?!.\s) # must not contain any whitespace characters (?=.[!$#+@%&]) # nust contain one of these symbols .{8,} # match anything with previous conditions at least 8 characters long

Submitted by anonymous