title: REGEXEXTRACT before a character
body: <p>I'm trying to write a small regex to extract the text before an optional <code>(</code>.</p>
  
  <p>I have this:</p>
  
  <pre><code>^(.*)[\(.*]|$
  </code></pre>
  
  <p>But its not working for some reason. Doesn't seem to make it to the <code>$</code> if there is no <code>(</code> present.</p>
  
  <p>Any help would be much appreciated</p>
  
  <p>Cheers</p>