fork(4) 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. var s = "abc({";
  9. var results = Regex.Split(s, @"(\()").Where(m=>!string.IsNullOrEmpty(m)).ToList();
  10. Console.WriteLine(string.Join(", ", results));
  11. }
  12. }
Success #stdin #stdout 0.03s 30680KB
stdin
Standard input is empty
stdout
abc, (, {