hacker rank 23th problem (valid username regex)
23.VALID USERNAME REGEX
class UsernameValidator {
public static final String regularExpression = "^[[A-Z]|[a-z]][[A-Z]|[a-z]|\\d|[_]]{7,29}$";
Scanner scan =new Scanner(System.in);
}
Success
8
Julia
Samantha
Samantha_21
1Samantha
Samantha?10_2A
JuliaZ007
Julia@007
_Julia007
Invalid
Valid
Valid
Invalid
Invalid
Valid
Invalid
Invalid
Comments