I want to find an error in the bibliographic description using regular expressions. I have a pattern (([1-9][0-9]*)\s[с]\S) but I want to match those elements of the line that do not match this pattern.

    1 answer 1

    To get all sections of the line that do not match this regular schedule , you can use the Regex.Split method

      string[] substrings = Regex.Split(input, pattern); foreach (string match in substrings) { Console.WriteLine($"'{match}'"); } 

    All matches will be safely removed as a delimiter.

    • Only template should be without exciting groups [1-9][0-9]*\sс\S - Wiktor Stribiżew