title: Regex with Non-capturing Group
body: <p>I am trying to understand Non-capturing groups in Regex.</p>
  
  <p>If I have the following input:</p>
  
  <pre><code>He hit the ball.  Then he ran.  The crowd was cheering!  How did he feel?  I felt so energized!
  </code></pre>
  
  <p>If I want to extract the first word in each sentence, I was trying to use the match pattern:</p>
  
  <pre><code>^(\w+\b.*?)|[\.!\?]\s+(\w+)
  </code></pre>
  
  <p>That puts the desired output in the submatch.  </p>
  
  <pre><code>Match   $1
  He      He  
  . Then  Then
  . The   The
  ! How   How
  ? I     I
  </code></pre>
  
  <p>But I was thinking that using non-capturing groups, I should be able to get them back in the match.</p>
  
  <p>I tried:</p>
  
  <pre><code>^(?:\w+\b.*?)|(?:[\.!\?]\s+)(\w+)
  </code></pre>
  
  <p>and that yielded:</p>
  
  <pre><code>Match   $1
  He  
  . Then  Then
  . The   The
  ! How   How
  ? I     I
  </code></pre>
  
  <p>and 
      ^(?:\w+\b.*?)|(?:[.!\?]\s+)\w+</p>
  
  <p>yielded:</p>
  
  <pre><code>Match
  He
  . Then
  . The
  ! How
  ? I
  </code></pre>
  
  <p>What am I missing?  </p>
  
  <p>(I am testing my regex using RegExLib.com, but will then transfer it to VBA).</p>