title: Regex - finding capital words in string
body: <p>I'm trying to learn how to use regular expressions but have a question. Let's say I have the string</p>
  
  <pre><code>line = 'Cow Apple think Woof`
  </code></pre>
  
  <p>I want to see if <code>line</code> has at least two words that begin with capital letters (which, of course, it does). In Python, I tried to do the following</p>
  
  <pre><code>import re
  test = re.search(r'(\b[A-Z]([a-z])*\b){2,}',line)
  print(bool(test))
  </code></pre>
  
  <p>but that prints <code>False</code>. If I instead do</p>
  
  <pre><code>test = re.search(r'(\b[A-Z]([a-z])*\b)',line)
  </code></pre>
  
  <p>I find that <code>print(test.group(1))</code> is <code>Cow</code> but <code>print(test.group(2))</code> is <code>w</code>, the last letter of the first match (there are no other elements in <code>test.group</code>). </p>
  
  <p>Any suggestions on pinpointing this issue and/or how to approach the problem better in general?</p>