tech stuff.

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 (yahoo.com, ymail.com, rocketmail.com):

  • 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:

(?:^.{,3}$|^.{33,}$|^[^a-z]|[^a-z0-9_.]|\..*\.|[_.]{2}|[_.]$)

Gmail Basic Restrictions (gmail.com):

  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:

(?:^.{,5}$|^.{31,}$|[^a-z0-9.])

Windows Live Restrictions (hotmail.com, live.com):

  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

(?:^.{,3}$|^.{31,}$|[^a-z0-9._-]|fuck|^[^a-z0-9])

MobileMe Restrictions (me.com, mac.com):

  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.

Advertisements

Written by Lee Verberne

2008/08/29 at 21:42

Posted in Internet

Tagged with

One Response

Subscribe to comments with RSS.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: