title: Using regEx to remove digits from string
body: <p>I am trying to remove all digits from a string that are not attached to a word. Examples:</p>
  
  <pre><code> "python 3" =&gt; "python"
   "python3" =&gt; "python3"
   "1something" =&gt; "1something"
   "2" =&gt; ""
   "434" =&gt; ""
   "python 35" =&gt; "python"
   "1 " =&gt; ""
   " 232" =&gt; ""
  </code></pre>
  
  <p>Till now I am using the following regular expression:</p>
  
  <p><code>((?&lt;=[ ])[0-9]+(?=[ ])|(?&lt;=[ ])[0-9]+|^[0-9]$)</code></p>
  
  <p>which can correctly do some of the examples above, but not all. Any help and some explanation?</p>