fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. using System.IO;
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var data = "A bracket is a tall punctuation mark[1] typically used in matched pairs within text,[2] to set apart or interject other text.";
  9. Console.WriteLine(String.Join("\n", Regex.Split(data,@"\[([^]]*)]",RegexOptions.ExplicitCapture)));
  10. }
  11.  
  12. }
Success #stdin #stdout 0.11s 24672KB
stdin
Standard input is empty
stdout
A bracket is a tall punctuation mark
 typically used in matched pairs within text,
 to set apart or interject other text.