title: BigQuery Illegal Escape Sequence for backslash /
body: <p>I am using UDF to do a little regex for phrase like 'test/test' and I came across an error that I can't correct.</p>
  
  <pre><code>CREATE TEMPORARY FUNCTION parseMethod(queryString STRING)
  RETURNS STRING
  LANGUAGE js AS
  \"\"\"
  var match_regex = /test\/(\w+)/i;
  var found_method;
  if(found_method = queryString.match(match_regex)){
    method_list = found_method[1];
  }
  return method_list;
  \"\"\";
  
  SELECT
  parseMethod('test/test') AS result
  </code></pre>
  
  <p>When I run this code, I get an error saying</p>
  
  <pre><code>Error in query string: Error processing job
  'click-1315:XXXXXXXX': Syntax error:
  Illegal escape sequence: \/
  </code></pre>
  
  <p>The javascript function works fine in node.js so I am guessing parsing of BigQuery doesn't like this format. I also tried <code>\\/</code> but same error. How can I fix this?</p>