title: How to avoid capturing overlapping patterns while using java regex?
body: <p>In the following POS tagged sentence (and similar sentences) what regular expression to use in order to capture only two-word noun noun compounds (i.e. <code>\p{Alnum}+_NN[PS]? \p{Alnum}[PS]?</code>) and avoid capturing two-word matches that are part of larger phrases. </p>
  
  <pre><code>I_PRP will_MD never_RB go_VB to_IN sun_NN devil_NN auto_NN again_RB but_CC my_PRP$ family_NN members_NNS will_MD ._.
  </code></pre>
  
  <p>In particular I would like to capture <code>family_NN members_NN</code> but not <code>sun_NN devil_NN</code> and <code>devil_NN auto_NN</code>. </p>
  
  <p>Currently I use the following regex with positive lookahead:</p>
  
  <pre><code>"(?=\\b([\\p{Alnum}]+)_(NN[SP]?)\\s([\\p{Alnum}]+)_(NN[SP]?)\\b)."
  </code></pre>
  
  <p>The problem is in addition to <code>family_NN members_NNS</code> it captures <code>sun_NN devil_NN</code>, <code>devil_NN auto_NN</code>. </p>