Skip to content

Instantly share code, notes, and snippets.

@markus101
Created August 14, 2014 15:29
Show Gist options
  • Save markus101/29e1ef50db87b3d9f86d to your computer and use it in GitHub Desktop.
Save markus101/29e1ef50db87b3d9f86d to your computer and use it in GitHub Desktop.
Log4Netly Replace Special Characters Regex
private static readonly Regex SpecialCharactersRegex = new Regex(@"[^a-z0-9_]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static string RemoveSpecialCharacters(string key)
{
return SpecialCharactersRegex.Replace(key, "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment