private void FormatTokens() { StringBuilder result = new StringBuilder(""); foreach (string token in TokenRegex.Split(textBoxAccessTokens.Text)) { if (!string.IsNullOrWhiteSpace(token)) { result.AppendLine(token.Trim()); } } textBoxAccessTokens.Text = result.ToString().Trim(); }