fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9.  
  10. String s = @"[[Hello]]
  11. <tag Text=""my [[Test]] is [[Test2]] for [[Test3]][[Test4]]"">";
  12.  
  13. Match m = Regex.Match(s, @"""[^""]*""|(\[\[[^]]*\]\])");
  14.  
  15. if (m.Success)
  16. Console.WriteLine(m.Groups[1].Value);
  17.  
  18.  
  19. }
  20. }
Success #stdin #stdout 0.07s 34112KB
stdin
Standard input is empty
stdout
[[Hello]]