title: PHP Regex look ahead and look behind - both must not match?
body: <p>I am currently looking for a way to remove fullstops from a string in certain places.</p>
  
  <p>I want it so that it will remove fullstops only if 2 conditions are not met;</p>
  
  <p>&nbsp;&nbsp;&nbsp;There is not a digit before the fullstop.</p>
  
  <p><strong>AND</strong></p>
  
  <p>&nbsp;&nbsp;&nbsp;There is not a digit after the fullstop.</p>
  
  <p>I currently have this regex</p>
  
  <pre><code>'#(?&lt;!\d)\.(?!\d)#'
  </code></pre>
  
  <p>But this does not remove fullstops in strings such as</p>
  
  <pre><code>'hello.1', '1.hello'
  </code></pre>
  
  <p>I am guessing that as there is either a digit before or after the fullstop the match fails and it is not recognized. </p>
  
  <p>How can I make it so that both the look ahead and look behind must be met in order for there to be a match and the fullstop get removed correctly?</p>
  
  <p>Thank you.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I want it to remove fullstops when and only when there is not a digit before <strong>~OR~</strong> there is not a digit after the fullstop. So there can only be a fullstop if the string is like so <code>(a digit).(a digit)</code> but will remove fullstops in any other circumstances.</p>