title: Regex add space after colon
body: <p>I'm trying to add a space between the colon and the character or number if there is no space already:</p>
  
  <pre><code>this is my sentence:hi it's midnight
  this is my sentence:2012 was a good year.
  this sentence should be ignored: ignore me
  </code></pre>
  
  <p>And I want it to read:</p>
  
  <pre><code>this is my sentence: hi it's midnight
  this is my sentence: 2012 was a good year.
  this sentence should be ignored: ignore me
  </code></pre>
  
  <p>I've tried this with no success.
  <a href="https://stackoverflow.com/questions/8405946/regex-to-insert-space-in-vim">Regex to insert space in vim</a></p>
  
  <p>I can get the ":X" or ":0" using this (it doesn't match the space after the colon, which is good):</p>
  
  <pre><code>:[^\s]
  </code></pre>
  
  <p>But if I replace with:</p>
  
  <pre><code>: $0
  </code></pre>
  
  <p>It ends up like:</p>
  
  <pre><code>this is my sentence: :hi it's midnight
  this is my sentence: :2012 was a good year.
  </code></pre>
  
  <p>I'm using <a href="http://www.gskinner.com/RegExr/" rel="nofollow noreferrer">http://www.gskinner.com/RegExr/</a> to test the pattern.</p>
  
  <p>I'll be using PHP preg_replace function</p>
  
  <p>Any help is much appreciated.
  Thanks in advance.</p>