Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
Python

r"
(?P<password>((?=\S*[A-Z])(?=\S*[a-z])(?=\S*\d)(?=\S*[\!\"\§\$\%\&\/\(\)\=\?\+\*\#\'\^\°\,\;\.\:\<\>\ä\ö\ü\Ä\Ö\Ü\ß\?\|\@\~\´\`\\])\S{8,}))
"

Description

Checks for password containing at least 1 Upper case, 1 lower case, 1 digit and 1 special character, all together with a length of at least 8. (This pattern allows any order of the requried elements, other than what was been distributed here before)

Submitted by Tom Spielvogel - 9 years ago