title: Remove last character in regex .replace
body: <p>I'm trying to detect numbers followed by "." and then wrap them in a <code>&lt;span&gt;</code> without that last "."</p>
  
  <p>So far, this is what I have:</p>
  
  <pre><code>$(".item_title").each(function(index) {
      var t = $(this).html().replace(/(^\d+\.)/g, "&lt;span&gt;$1&lt;/span&gt;");  
      $(this).html(t);
  });
  </code></pre>
  
  <p>But I end up with <code>&lt;span&gt;5.&lt;/span&gt;</code> and I'm looking for <code>&lt;span&gt;5&lt;/span&gt;</code></p>
  
  <p>Also, is the way I'm doing the regex replace correct and efficient?</p>
  
  <p>Thanks!</p>