title: regular expression using C# to find a date
body: <p>I try to use regular expression to find a date and time from a log file that looks like this:</p>
  
  <pre><code>Dec 25 14:11:03....
  </code></pre>
  
  <p>what is the best way to find them in log file and calculate the date and time
  to an absolute value? </p>
  
  <p>I am trying this code but it doesn't find the expression:</p>
  
  <pre><code>public long getDateAndgetTimeFromLog(TypeOfProtocols type, string lineOfLog)
  {
      long dnt = 0; //variable from date and time.
  
      switch (type)
      {
          case TypeOfProtocols.PlinkSnifer:
              if (Regex.IsMatch(lineOfLog, @"\d{2}:\d{2}:d{2}"))
              {
  
              }
              break;
      }
      return dnt;
  }
  </code></pre>