fork(1) 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. string text = "[\"a1\",\"a2\"]";
  12. Regex rg2 = new Regex(@"\A\[""[a-zA-Z0-9]+""(?:,\s*""[a-zA-Z0-9]+"")*]\z");
  13. Console.WriteLine(rg2.IsMatch(text));
  14. }
  15. }
Success #stdin #stdout 0.09s 29276KB
stdin
Standard input is empty
stdout
True