fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string pattern = @"(?<=\bInitValue\([^()]*)[^, ]+(?=[^()]*\))";
  9. string str = "InitValue(Input1, Input2, Input3)";
  10. foreach (Match m in Regex.Matches(str, pattern))
  11. {
  12. Console.WriteLine(m.Value);
  13. }
  14. }
  15. }
Success #stdin #stdout 0.04s 134592KB
stdin
Standard input is empty
stdout
Input1
Input2
Input3