I have the following example code:
var inputString = "ñaáme";
inputString = inputString.Replace('ñ', '\u00F1');
var normalizedString = inputString.Normalize(NormalizationForm.FormD);
var result = Regex.Replace(normalizedString, @"[^ñÑa-zA-Z0-9\s]*", string.Empty);
return result.Replace('\u00F1', 'ñ'); // naame :(
I need to normalize the text without removing the "ñ"s
I followed this example But it's for Java and it has not worked for me
I want your result to be: "ñaame".