Created
August 14, 2014 15:29
-
-
Save markus101/29e1ef50db87b3d9f86d to your computer and use it in GitHub Desktop.
Log4Netly Replace Special Characters Regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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