tech stuff.

Posts Tagged ‘email

Free Webmail Username Restrictions

with one comment

What criteria determine a valid username for the top web mail providers?  This seems like it would be useful for filtering that list of a couple hundred thousand e-mail addresses we’ve all got lying around.

Yahoo! Mail Basic Restrictions (,,

  • 4 to 32 characters
  • Starts with a letter
  • Letters, numbers, underscores and one period (.)
  • No consecutive underscores or period, or combination of the two ([_.]{2}
  • Cannot end with underscore or period

Regex for invalid username:


Gmail Basic Restrictions (

  1. 6 to 30 characters
  2. Only letters, numbers and periods
  3. Starts and ends alphanumeric
  4. No consecutive periods (also required by RFC 2822)

Because of the restriction on the character set (#2), RFC 2822 compliance guarantees #3 & #4.  As such, these won’t appear in the following regex.

Regex for invalid username:


Windows Live Restrictions (,

  1. 4 to 32 characters
  2. Only letters, numbers, periods, hyphens and underscores
  3. Cannot have the character sequence “fuck”
  4. Starts with alphanumeric
  5. Cannot end with a period (also required by RFC 2822)

The minimum length was just a guess on my part.  It’s not published, but 4 is the smallest free user name I could find.  I’m sure there are words besides “fuck” that aren’t allowed, but you get the point


MobileMe Restrictions (,

  1. 3 to 20 characters
  2. Only letters, numbers, periods, hyphens and underscores

Note: The regex on this page are intended for case-insensitive, un-anchored searches.

Written by Lee Verberne

2008-08-29 at 21:42

Posted in Internet

Tagged with