code: function getRegExpPattern(node) {
              if (node.regex) {
                  return node.regex.pattern;
              }
              if (typeof node.value === "string" &&
                  (node.parent.type === "NewExpression" || node.parent.type === "CallExpression") &&
                  node.parent.callee.type === "Identifier" &&
                  node.parent.callee.name === "RegExp" &&
                  node.parent.arguments[0] === node
              ) {
                  return node.value;
              }
  
              return null;
          }
docs: Get the regex expression
  @param {ASTNode} node node to evaluate
  @returns {RegExp|null} Regex if found else null
  @private