fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string s = "\t1.2.1 ";
  8. Regex regex = new Regex(@"^[ \t][0-9]+(?:\.[0-9]+)*[ \t]");
  9.  
  10. if (regex.IsMatch(s)) {
  11. Console.WriteLine("Match!");
  12. }
  13. }
  14. }
Success #stdin #stdout 0.06s 21124KB
stdin
Standard input is empty
stdout
Match!