title: Regex to split words in Python
body: <p>I was designing a regex to <strong>split</strong> all the <strong>actual words</strong> from a given <strong>text</strong>:</p>
  
  <p><br>
  <em>Input Example:</em></p>
  
  <pre><code>"John's mom went there, but he wasn't there. So she said: 'Where are you'"
  </code></pre>
  
  <p><br>
  <em>Expected Output:</em></p>
  
  <pre><code>["John's", "mom", "went", "there", "but", "he", "wasn't", "there", "So", "she", "said", "Where", "are", "you"]
  </code></pre>
  
  <p><br>
  <br>
  I thought of a regex like that:</p>
  
  <pre><code>"(([^a-zA-Z]+')|('[^a-zA-Z]+))|([^a-zA-Z']+)"
  </code></pre>
  
  <p>After splitting in Python, the result contains <code>None</code> items and empty spaces.</p>
  
  <p>How to get rid of the None items? And why didn't the spaces match?</p>
  
  <p><em><br>
  Edit:
  <br>
  Splitting on spaces, will give items like: <code>["there."]</code>
  <br>
  And splitting on non-letters, will give items like: <code>["John","s"]</code>
  <br>
  And splitting on non-letters except <code>'</code>, will give items like: <code>["'Where","you'"]</code></em></p>