Java tutorial
//package com.java2s; public class Main { public static boolean isInputLengthEnough(String username) { return username.matches("(\\w|\\d){6,20}"); } }