title: Regex remove characters after space in each line
body: <p>I have a text file with 50k lines like this</p>
  
  <pre><code>word1 1 23
  word2 43 23
  word3 197
  word4
  </code></pre>
  
  <p>and need a way to make it look like this:</p>
  
  <pre><code>word1
  word2
  word3
  word4
  </code></pre>
  
  <p>So I need a way to remove every character behind the first space in each line.
  How do I do this?</p>