At least 6 regex characters

I am looking for a regular expression that checks for at least 6 characters, regardless of the type of character.

+6
regex
source share
3 answers

This match has 6 or more characters, but a new line:

/^.{6,}$/ 
+49
source share

If I understand correctly, do you need a regular expression operator that checks at least 6 characters (letters and numbers)?

 /[0-9a-zA-Z]{6,}/ 
+8
source share

Something like that?

 <asp:TextBox id="txtUsername" runat="server" /> <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="Field not valid!" ControlToValidate="txtUsername" ValidationExpression="[0-9a-zA-Z]{6,}" /> 
+3
source share

All Articles