title: Java - regex - find all matches
body: <p>I need some help in Java regex.</p>
  
  <p>My text is this <code>abc abc abc xyz xyz xyz</code>.
  I need to find <strong>all matches which have <em>only one</em> word between <code>abc</code> and <code>xyz</code></strong></p>
  
  <p>Here there are the two matches that should be returned:</p>
  
  <ol>
  <li><code>abc abc xyz</code>  ==> an <code>abc</code> is present between <code>abc</code> and <code>xyz</code></li>
  <li><code>abc xyz xyz</code>  ==> an <code>xyz</code> is present between <code>abc</code> and <code>xyz</code></li>
  </ol>
  
  <p>My regex pattern:</p>
  
  <pre><code>abc\s+([a-z]*?)\s+xyz
  </code></pre>
  
  <p>It seems to match only the first match which is <code>abc abc xyz</code>. It does not find <code>abc xyz xyz</code></p>
  
  <p>What is the right pattern to match all?</p>