Double backslashes to include backslash characters in a string

Reference:

  "When using the constructor function, the normal string escape rules
  (preceding special characters with \ when included in a string)
  are necessary. For example, the following are equivalent:
      var re = /\w+/;
      var re = new RegExp("\\w+");
  "
-- RegExp, Mozilla Developer Network
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp