title: Java Regex :: first word in each line of a String
body: <p>Let's look at the following String: </p>
  
  <pre><code>String input = "A bla bla bla A blaa\r\n" +
                 "B boo foo A B abo \r\n" + 
                 "A yow B B yow";
  </code></pre>
  
  <p>And here is my regex:</p>
  
  <pre><code>String regex = "([AB]) (.*?)(?=$|[AB])";
  </code></pre>
  
  <p>I get with it each "A" or "B".</p>
  
  <p>But what I look for is to get "A" or "B" only if it's the first word in each line of my String.</p>
  
  <p>Thanks in advance.</p>