title: How to use regex in Bigquery
body: <p>I am unable to apply a proper <a href="https://cloud.google.com/dataprep/docs/html/Supported-Special-Regular-Expression-Characters_57344771" rel="noreferrer">regex</a> on customtarget column in bigquery.</p>
  
  <p><strong>With normal MSSQL:</strong></p>
  
  <pre><code>SELECT * from mytable where CustomTargeting like = '%u=%'  -- is all okay
  </code></pre>
  
  <p><strong>With Bigquery(legacy-sql) :</strong></p>
  
  <pre><code>SELECT REGEXP_EXTRACT(CustomTargeting, r'[^u=\d]') as validate_users
  from [project:dataset.impressions_4213_20181112] Limit 10
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Exactly one capturing group must be specified</p>
  </blockquote>
  
  <p>Update:</p>
  
  <p>Yet couldn't get substring u ='anystring'</p>
  
  <p><a href="https://i.stack.imgur.com/htORs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/htORs.png" alt="enter image description here"></a></p>
  
  <p>How can I extract data where CustomTargeting ='%u=somestring%'?</p>