private bool CheckIfHostNameValid(String hostName) { return !ForbiddenHostNameChars.IsMatch(hostName); // Returns false if reg.ex. matches any of forbidden chars. }