function getRegExp(node) {
			if (node.regex) {
				return node.regex;
			}
			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
			) {
				const pattern = node.value;
				const flags =
					node.parent.arguments.length > 1 &&
					node.parent.arguments[1].type === "Literal" &&
					typeof node.parent.arguments[1].value === "string"
						? node.parent.arguments[1].value
						: null;

				return { pattern, flags };
			}

			return null;
		}
Get the regex expression
@param {ASTNode} node `Literal` node to evaluate
@returns {{ pattern: string, flags: string | null } | null} Regex if found (the given node is either a regex literal
or a string literal that is the pattern argument of a RegExp constructor call). Otherwise `null`. If flags cannot be determined,
the `flags` property will be `null`.
@private