Search the above patterns in password .
Matcher Digit = digit . matcher ( password ) ; Matcher Upper = upper . matcher ( password ) ; Matcher Lower = lower . matcher ( password ) ; Matcher Special = spChar . matcher ( password ) ;