philcruz philcruz - 3 months ago 7
C# Question

How can you strip non-ASCII characters from a string? (in C#)

How can you strip non-ASCII characters from a string? (in C#)

Answer
string s = "søme string";
s = Regex.Replace(s, @"[^\u0000-\u007F]+", string.Empty);
Comments