0
static final Pattern PASSWORD_PATTERN = Pattern.compile("((?=.*\\d)(?=.*[a-z])(?=.*[!@#$%^&*]).{5,10})");
Could anyone explain me it briefly..
1 Answer
0
The text you check against this pattern must contain at least one of the special characters !@#$%^&* and the characters \d and the text must have al least 5 characters. The return will be the first 5 to 10 characters, as many as it will find.
For more info you could test your pattern on regex101.com