Fixed special character escaping in a constructor

cf.  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp

Error detected through JSHint