← Pattern Library PATTERN
Security · Validation
/^[a-zA-Z0-9_]{3,16}$/
Security · Validation Flags:
Description
Validates a 3–16 character username made of letters, digits, and underscores. Spaces and special characters are not allowed. Commonly used as the ID rule on sign-up forms.
Example Matches
cool_user_99
regexFan
Test String
cool_user_99
Open this pattern in the tester
Other Patterns