Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Exp Regular
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Text; namespace Rextester { public class Program { public static void Main(string[] args) { var inputString = CleanInput("Mañana'será otro &!día()[{?# 'áéíóú äëïöü'"); var normalizedString = inputString.Normalize(NormalizationForm.FormD); var sb = new StringBuilder(); for (int i =0; i < normalizedString.Length; i++) { var uc = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(normalizedString[i]); if (uc != System.Globalization.UnicodeCategory.NonSpacingMark) sb.Append(normalizedString[i]); } Console.WriteLine(sb.ToString().Normalize(NormalizationForm.FormC)); } static string CleanInput(string strIn) { try { return Regex.Replace(strIn, @"[^\w\.@-]", " ", RegexOptions.None, TimeSpan.FromSeconds(1.5)); } catch (RegexMatchTimeoutException) { return String.Empty; } } } }
run
|
edit
|
history
|
help
0
const
Test DateTimeStyles.AdjustToUniversal
Pascal's triangle
linked list reversal recursive
C# simple fib solution
Rextester
First Non repeat char
Imp
ggggg
ArithmeticOperations