title: RegEx - greedy white space match
body: <p>I am trying to determine the correct RegEx syntax to perform the following. I have line in a file in which I want to match every character before the first occurrence of white space. </p>
  
  <p>so for example in the line:</p>
  
  <blockquote>
    <p>123abc xyz foo bar</p>
  </blockquote>
  
  <p>it is unclear to me why the following:</p>
  
  <pre><code>^.*\s
  </code></pre>
  
  <p>is matching up to the b in the word bar: </p>
  
  <blockquote>
    <p>123abc xyz foo </p>
  </blockquote>
  
  <p>It appears to me that the \s is greedy, however I am not certain how I can make it not greedy and just match 123abc I have tried various forms of this regex in an attempt to make it non-greedy <code>^.*\s?</code> or something like this, however I have been unsuccessful. Thank you in advance</p>