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 input = @"/SERVER ""\""TEST_SERVER\""""";
  11.  
  12. Regex rgx = new Regex(@"(?<=\/SERVER\s*(?:[""\\]+)?)\w+(?=(?:[\\""]+|$))");
  13.  
  14. foreach (Match m in rgx.Matches(input))
  15. Console.WriteLine(m.Groups[0].Value);
  16.  
  17. }
  18. }
Success #stdin #stdout 0.07s 34760KB
stdin
Standard input is empty
stdout
TEST_SERVER