title: Taking selected groups in regex
body: <p>I am trying to implement a regex which takes the string <code>3oranges</code> as one group and does not take more than 1 match for this string. I also want to give the string <code>3oranges2apples4bananas</code> and this should give 3 different groups accordingly.</p>
  
  <p>I have tried creating a regex which gets the matches the way I want, but doesnt give only one group as a match. It gives 2 for each match : <code>3oranges</code> gives <code>oranges</code> and <code>3oranges</code> as matches.</p>
  
  <p>Here is the regex I wrote. I am writing it this way because I want to restrict the order in which the data is given and also want to make sure I get a limited number of digits to process later on.</p>
  
  <pre><code>^(\d{1,4}(orange)){0,1}(\d{1,4}(apple)){0,1}(\d{1,4}(banana)){0,1}$
  </code></pre>
  
  <p>Like I said earlier, I want to get only a single group for desired match. </p>
  
  <pre><code>INPUT: 
  3oranges2apples4bananas
  
  OUTPUT: Matches found
  3oranges
  oranges
  2apples
  apples
  4bananas
  bananas
  
  DESIRED OUTPUT:
  3oranges
  2apples
  4bananas
  </code></pre>
  
  <p>Is what I am asking for possible, and if yes, how can I achieve this?</p>
  
  <p>EDIT 1: 
  I didnt realize the importance of the follow up question I had to this question, but I wont waste any time.
  I also want to consider it as <code>oranges</code> if the text is <code>o</code>, <code>orange</code> or <code>oranges</code><br>
  Something like this: </p>
  
  <pre><code>^(\d{1,4}(oranges|orange|o)){0,1}(\d{1,4}(apples|apple|a)){0,1}(\d{1,4}(bananas|banana|b)){0,1}$
  </code></pre>