fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var input = "10*[1*[{0.1-0.9}(10)]]10*[1*[{0.2-0.3}(10)]]";
  9. var pattern = @"(\d+)\*\[([^\[\]]+)\]";
  10. foreach (Match m in Regex.Matches(input, pattern)) {
  11. Console.WriteLine(m.Value);
  12. }
  13. }
  14. }
Success #stdin #stdout 0.11s 24432KB
stdin
Standard input is empty
stdout
1*[{0.1-0.9}(10)]
1*[{0.2-0.3}(10)]