Introduction
Here is the source code for Main.java
Source
//package com.java2s;
public class Main {
private static final String LOGIN_PATTERN = "^[A-Za-z0-9_-]{4,12}$";
public static boolean validateLogin(String login) {
return login != null && login.matches(LOGIN_PATTERN);
}
}