I'd use `Regex` for this. public static class StringCleaner { private const Pattern = @"[^a-zA-Z0-9 \#\\\'\(\)\+\,\-\.\/\[\]_`\{\|\}\~\:\?@]"; public static string Clean(string address, string replacement = "") => Regex.Replace(address, Pattern, replacement); }