Launching a SaaS?·Collect waitlist signups before you build — before.run
SandboxPatternsDetectDocs
Social
#username
#user
#handle
#login

Username

Matches a valid username: 3–20 characters, letters, digits, hyphens, and underscores. No leading/trailing hyphens or underscores.

User registrationSocial media handlesAPI key naming
/
/
Test String
4 matches
[…]Character class […]Matches any single character listed in this set
a-za-za-z — range from 'a' to 'z'
A-ZA-ZA-Z — range from 'A' to 'Z'
0-90-90-9 — range from '0' to '9'
(?:…)?Non-capturing groupNon-capturing group — groups without capturing (no index assigned) — repeated zero or one time (optional) · ? — zero or one time (optional)
[…]{1,18}Character class […]Matches any single character listed in this set — repeated between 1 and 18 times · {1,18} — between 1 and 18 times
[…]Character class […]Matches any single character listed in this set
Pattern: 47 charsInput: 34 chars
100% client-side · private

Valid Examples

  • john_doe
  • user-123
  • alice
  • web_dev_42

Invalid Examples

  • -john
  • john-
  • _user
  • a
  • this_username_is_way_too_long_for_any_system