fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text.RegularExpressions;
  6.  
  7. public class Test
  8. {
  9. public static void Main()
  10. {
  11. var text = "Artículo 1. This is a test that includes : 1) Sample text 2) Sample text";
  12. var result = Regex.Split(text, @"(?!^)\s+(?=\bArtículo\s+[0-9]+\.|[a-z]\)|[1-9]\d?\)|\bPárrafo\b)", RegexOptions.None);
  13. Console.WriteLine(string.Join("\n", result));
  14. }
  15. }
Success #stdin #stdout 0.06s 21196KB
stdin
Standard input is empty
stdout
Artículo 1. This is a test that includes :
1) Sample text
2) Sample text