title: Extract strings before a regex in BigQuery
body: <p>I am new to regex. I am trying to extract the website name from the long URL like below.</p>
  
  <p><a href="http://connect.themediatrust.com/d/?a=19481782541" rel="nofollow noreferrer">http://connect.themediatrust.com/d/?a=19481782541</a></p>
  
  <p>I am trying to get everything before ".com" part.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT
    customer_id,
    COALESCE(REGEXP_EXTRACT(referrer_uri, r'([^(.+?)".com"])'),referrer_uri) AS referrer_uri
  FROM
    [zz_marketing_analytics.visit_from_zumobi]
  WHERE
    referrer_uri="http://connect.themediatrust.com/d/?a=19481782541";
  </code></pre>
  
  <p>I am getting only "h" as refer URI. I'm not sure what's wrong.</p>