fork(2) download
  1. using System;
  2. using System.Linq;
  3. using System.Text.RegularExpressions;
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. const string stringToTest = "Am Rusch";
  9. const string patternToMatch = @"\bRusch*";
  10. Console.WriteLine(Regex.Split(stringToTest,@"[^\w\p{M}]+")
  11. .Where(m => !string.IsNullOrEmpty(m))
  12. .ToList()
  13. .FindIndex(p => Regex.IsMatch(p,patternToMatch))
  14. );
  15. }
  16. }
Success #stdin #stdout 0.13s 24344KB
stdin
Standard input is empty
stdout
1