diff --git a/docs/usage/self-hosted-experimental.md b/docs/usage/self-hosted-experimental.md
index 563757351086faf38622cb7cca3d532ad40fe720..5945938bef3cbf47a19714e338e515914dd618bc 100644
--- a/docs/usage/self-hosted-experimental.md
+++ b/docs/usage/self-hosted-experimental.md
@@ -44,6 +44,10 @@ See [issue 8660](https://github.com/renovatebot/renovate/issues/8660) for backgr
 
 Suppress the default warning when a deprecated version of Node.js is used to run Renovate.
 
+## `RENOVATE_X_IGNORE_RE2`
+
+Skip initializing `RE2` for regular expressions and instead use Node-native `RegExp` instead.
+
 ## `RENOVATE_X_PLATFORM_VERSION`
 
 If set, Renovate will use this string as GitLab server version instead of checking via the GitLab API.
diff --git a/lib/util/regex.ts b/lib/util/regex.ts
index fd227ec2da32fd41d81b34f7e545f6ef9cfef564..8396102e429beb3d26577d9a610c95f6190435cd 100644
--- a/lib/util/regex.ts
+++ b/lib/util/regex.ts
@@ -8,16 +8,18 @@ let RegEx: RegExpConstructor;
 
 const cache = new Map<string, RegExp>();
 
-try {
-  const RE2 = re2();
-  // Test if native is working
-  new RE2('.*').exec('test');
-  logger.debug('Using RE2 as regex engine');
-  RegEx = RE2;
-} catch (err) {
-  logger.warn({ err }, 'RE2 not usable, falling back to RegExp');
-  RegEx = RegExp;
+if (!process.env.RENOVATE_X_IGNORE_RE2) {
+  try {
+    const RE2 = re2();
+    // Test if native is working
+    new RE2('.*').exec('test');
+    logger.debug('Using RE2 as regex engine');
+    RegEx = RE2;
+  } catch (err) {
+    logger.warn({ err }, 'RE2 not usable, falling back to RegExp');
+  }
 }
+RegEx ??= RegExp;
 
 export function regEx(
   pattern: string | RegExp,