title: Retrieving first X words from a string in Oracle Select
body: <p>I need to select the first X words in a string, where x can be any number from 0-100.   Is there an easy way to do this?  I found the following example to select the first 2 words from a string:</p>
  
  <pre><code>select regexp_replace('Hello world this is a test', '(\w+ \w+).*$','\1') as first_two
  from dual
  </code></pre>
  
  <p>How would I select the first X words from a string where X can be a number from 0-100?</p>