title: RegEx to match acronyms
body: <p>I am trying to write a regular expression that will match values such as <code>U.S.</code>, <code>D.C.</code>, <code>U.S.A.</code>, etc.</p>
  
  <p>Here is what I have so far -</p>
  
  <pre><code>\b([a-zA-Z]\.){2,}+
  </code></pre>
  
  <p>Note how this expression matches but does not include the last letter in the acronym.</p>
  
  <p>Can anyone help explain what I am missing here?</p>
  
  <p><a href="https://i.stack.imgur.com/fM2mx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fM2mx.png" alt="enter image description here"></a></p>
  
  <p><strong>SOLUTION</strong></p>
  
  <p>I'm posting the solution here in case this helps anyone.</p>
  
  <pre><code>\b(?:[a-zA-Z]\.){2,}
  </code></pre>
  
  <p>It seems as if a non-capturing group is required here.</p>