From 7601eb3351c97968c7084a2026b96c875c3859c5 Mon Sep 17 00:00:00 2001
From: Michael Kriese <michael.kriese@visualon.de>
Date: Wed, 22 Mar 2023 13:05:02 +0100
Subject: [PATCH] docs: fix `replacementNameTemplate` samples (#21085)

---
 docs/usage/configuration-options.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md
index 87689dd6ca..687ac7876a 100644
--- a/docs/usage/configuration-options.md
+++ b/docs/usage/configuration-options.md
@@ -2231,8 +2231,8 @@ For example, the following package rule can be used to replace the registry for
   "packageRules": [
     {
       "matchDatasources": ["docker"],
-      "matchPackagePatterns": ["^docker.io/.*)"],
-      "replacementNameTemplate": "{{{replace 'docker.io/' 'ghcr.io/' packageName}}}"
+      "matchPackagePatterns": ["^docker\\.io/.+"],
+      "replacementNameTemplate": "{{{replace 'docker\\.io/' 'ghcr.io/' packageName}}}"
     }
   ]
 }
@@ -2246,13 +2246,13 @@ Or, to add a registry prefix to any `docker` images that do not contain an expli
     {
       "description": "official images",
       "matchDatasources": ["docker"],
-      "matchPackagePatterns": ["^[a-z-]+(:|$).*"],
+      "matchPackagePatterns": ["^[a-z-]+$"],
       "replacementNameTemplate": "some.registry.org/library/{{{packageName}}}"
     },
     {
       "description": "non-official images",
       "matchDatasources": ["docker"],
-      "matchPackagePatterns": ["^[a-z-]+\\/[a-z-]+(:|$).*"],
+      "matchPackagePatterns": ["^[a-z-]+/[a-z-]+$"],
       "replacementNameTemplate": "some.registry.org/{{{packageName}}}"
     }
   ]
-- 
GitLab