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 = @"<(\w+\:[\w.-]+)>";
  9. string input = @"<staticText:HelloWorld>_<xmlNode:Node.03>_<date:yyy-MM-dd>_<time:HH-mm-ss-fff>
  10. ";
  11.  
  12. foreach (Match m in Regex.Matches(input, pattern))
  13. {
  14. Console.WriteLine(m.Groups[1].Value);
  15. }
  16. }
  17. }
Success #stdin #stdout 0.04s 134592KB
stdin
Standard input is empty
stdout
staticText:HelloWorld
xmlNode:Node.03
date:yyy-MM-dd
time:HH-mm-ss-fff