fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var block = "[0-9a-fA-F]{1,8}";
  9. var pattern = $@"(?<from>{block})\s*:\s*(?<to>{block})";
  10. Console.WriteLine(Regex.IsMatch("12345678 :87654321", pattern));
  11. }
  12. }
  13.  
  14.  
Success #stdin #stdout 0.03s 134784KB
stdin
Standard input is empty
stdout
True