philcruz philcruz - 1 year ago 72
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 Source
string s = "søme string";
s = Regex.Replace(s, @"[^\u0000-\u007F]+", string.Empty);