title: regex ensure string starts and ends with digits
body: <p>How do I write a regular expression for use in JavaScript that'll ensure the first and last characters of a string are always digits?</p>
  
  <pre><code>r = /\D+/g;
  var s = "l10ddd31ddd5705ddd";
  var o = r.test(s);
  console.log(o);
  </code></pre>
  
  <p>So, <code>1KJ25LP3665</code> would return true, while <code>K12M25XC5750</code> would return false.</p>