title: How to match either/or with Regex
body: <p>I apologise for the Regex question but..</p>
  
  <p>I'm developing a regex expression for scraping Job titles.</p>
  
  <p>The job Title will always be in the format:</p>
  
  <p>Job title: Word1 Word2 (Optional Word3)</p>
  
  <p>At the minute I currently have this:</p>
  
  <pre><code>Job Title: ([A-Z\w]+ [A-Z\w]+)|Job Title: ([A-Z\w]+ [A-Z\w]+ [A-Z\w]+)
  </code></pre>
  
  <p>I'm trying to get it to match job titles with either two or three words, and each side of the pipe character works individually (left side matches 2 word job titles, right side matchs 3 word job titles), however when I add the pipe character it only goes for the left half, matching 2 word job titles.</p>
  
  <p>Does anybody have an idea what I'm doing wrong?</p>
  
  <p>NB: I'm using <a href="https://regexper.com/#Job%20Title%3A%20(%5BA-Z%5Cw%5D%2B%20%5BA-Z%5Cw%5D%2B)%7CJob%20Title%3A%20(%5BA-Z%5Cw%5D%2B%20%5BA-Z%5Cw%5D%2B%20%5BA-Z%5Cw%5D%2B)" rel="nofollow" title="RegExper">Regexper</a> to visualise my expression, and it looks correct there.</p>
  
  <p>Cheers.</p>