fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5.  
  6. public class Test
  7. {
  8. public static void Main()
  9. {
  10. var pattern = @"\(([^,()]+),([^,()]+)\)";
  11. var str = "Test (1001,Sunday)";
  12. var match = Regex.Match(str, pattern);
  13. if (match.Success) {
  14. Console.WriteLine(match.Groups[1]);
  15. Console.WriteLine(match.Groups[2]);
  16. }
  17. }
  18. }
Success #stdin #stdout 0.07s 29508KB
stdin
Standard input is empty
stdout
1001
Sunday