title: Using regexp in Big Query to extract URLs
body: <p>I've been trying to extract any URL present within my 'Text' column in Big Query. The column contains a mixture of text and URLs dotted throughout (a cell might contain more than one URL) I'm trying to use this regexp: </p>
  
  <pre><code>SELECT
  
    REGEXP_EXTRACT  (Text, r'(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9%_:?\+.~#&amp;//=]*')
  FROM
  Data.Text_Files
  </code></pre>
  
  <p>I currently get 'failed to parse regular expression' when I try to run the query. I've tried modifying it but to no avail.</p>
  
  <p>The regexp works in an online builder but I'm just not sure how to incorporate it into Big Query.</p>
  
  <p>Any help would be much appreciated - or at least pointers on how to incorporate regular expressions into Big Query!</p>