title: Regular expression enforcing at least one in two groups
body: <p>I have to parse a string using regular expressions in which at least one group in a set of two is required. I cannot figure out how to write this case.</p>
  
  <p>To illustrate the problem we can think parsing this case:</p>
  
  <pre><code>String: aredhouse theball bluegreencar the
  Match:  ✓         ✓       ✓            ✗
  </code></pre>
  
  <ol>
  <li>Items are separated by spaces</li>
  <li><p>Each item is composed by an article, a colour and an object defined by groups in the following expression <code>(?P&lt;article&gt;the|a)?(?P&lt;colour&gt;(red|green|blue|yellow)*)(?P&lt;object&gt;car|ball|house)?\s*</code></p></li>
  <li><p>An item can have an 'article' but must have a 'colour' or/and an 'object'.</p></li>
  </ol>
  
  <p>Is there a way of making 'article' optional but require at least one 'colour' or 'object' using regular expressions?</p>
  
  <p><a href="https://play.golang.org/p/98h3UPZFrgx" rel="nofollow noreferrer">Here</a> is the coded Go version of this example, however I guess this is generic regexp question that applies to any language.</p>