Valid Username Regular Expression

  • + 0 comments

    `public static final String regularExpression = "[a-zA-Z][a-zA-Z0-9\_]{7,29}";

    [a-zA-Z] Matches any letter at the beggining

    [a-zA-Z0-9_] Matches any letter, digit or underscore. Equivalent to \w.

    {7,29} From 8 to 30, but counting here the beggining letter.