fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. Regex regex = new Regex(@"\b\d{4}-\d{3,4}\b");
  10. Match match = regex.Match("123456-12345");
  11. if(match.Success)
  12. {
  13. Console.WriteLine(match.Value);
  14. }
  15. }
  16. }
Success #stdin #stdout 0.02s 134592KB
stdin
Standard input is empty
stdout
Standard output is empty