title: Replace a single character within a match via Regex
body: <p>I have a simple pattern that I am trying to do a find and replace on.  It needs to replace all dashes with periods when they are surrounded by numbers.</p>
  
  <p>Replace the period in these:</p>
  
  <pre><code>3-54
  32-11
  111-4523mhz
  </code></pre>
  
  <p>Like So:</p>
  
  <pre><code>3.54
  32.11
  111.4523mhz
  </code></pre>
  
  <p>However, I do not want to replace the dash inside anything like these:</p>
  
  <pre><code>Example-One
  A-Test
  </code></pre>
  
  <p>I have tried using the following: </p>
  
  <pre><code>preg_replace('/[0-9](-)[0-9]/', '.', $string);
  </code></pre>
  
  <p>However, this will replace the entire match instead of just the middle.  How do you only replace a portion of the match?</p>