using System.Text.RegularExpressions; namespace MediaBrowser.Server.Implementations.Connect { public static class Validator { static readonly Regex ValidEmailRegex = CreateValidEmailRegex(); /// /// Taken from http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx /// /// private static Regex CreateValidEmailRegex() { const string validEmailPattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|" + @"([-a-z0-9!#$%&'*+/=?^_`{|}~]|(?