public static void Main()
Console.WriteLine(NormalizeVendorCode(@"<<<([:~*@---+=Hell_o_%&^№{/|\};,# $World...?!=+---@*~:])>>>"));
public static string NormalizeVendorCode(string term)
if (string.IsNullOrWhiteSpace(term))
throw new ArgumentException("term");
var result = string.Empty;
var allowedSpecialCharacters = new[]{'+', '#'};
foreach (var character in term)
if (char.IsLetterOrDigit(character) || allowedSpecialCharacters.Contains(character))
if (result == string.Empty)
throw new ArgumentException("term");