We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If someone manages to reach my comment, let me explain, in detail, why this works. ^ represents that starting character of the string. [aA-zZ] makes sure that the starting character is in the lowercase or uppercase alphabet. \\w{7,29} represents a check to make sure that the remaining items are word items, which includes the underscore, until it reaches the end and that is represented with $. The {7,29} represents the 8-30 character constraint given to us minus the predefined first character.
Valid Username Regular Expression
You are viewing a single comment's thread. Return to all comments →
If someone manages to reach my comment, let me explain, in detail, why this works.
^
represents that starting character of the string.[aA-zZ]
makes sure that the starting character is in the lowercase or uppercase alphabet.\\w{7,29}
represents a check to make sure that the remaining items are word items, which includes the underscore, until it reaches the end and that is represented with$
. The{7,29}
represents the 8-30 character constraint given to us minus the predefined first character.