From c8bb1bae8d55cb462e3fc25aeee8dd60eae14c54 Mon Sep 17 00:00:00 2001 From: Tom Fenech Date: Mon, 20 Feb 2023 13:22:15 +0100 Subject: [PATCH] docs(kubernetes): Remove extra backspace from regex in example (#4905) Remove extra backspace from regex in example In the example, `[\\w-]` would match a literal backspace `\`, the character `w` or a dash `-`. By removing the backspace, instead it matches any "word character" `\w` or a dash `-`. --- docs/config/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/config/README.md b/docs/config/README.md index 8e8fc778..e7e0766b 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -2456,7 +2456,7 @@ disabled = false [kubernetes.context_aliases] 'dev.local.cluster.k8s' = 'dev' '.*/openshift-cluster/.*' = 'openshift' -'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' +'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' [kubernetes.user_aliases] 'dev.local.cluster.k8s' = 'dev' 'root/.*' = 'root' @@ -2489,12 +2489,12 @@ and shortened using regular expressions: # OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`: '.*/openshift-cluster/.*' = 'openshift' # Or better, to rename every OpenShift cluster at once: -'.*/(?P[\\w-]+)/.*' = '$var_cluster' +'.*/(?P[\w-]+)/.*' = '$var_cluster' # Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone. # The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`) # and renames every matching kube context into a more readable format (`gke-cluster-name`): -'gke_.*_(?P[\\w-]+)' = 'gke-$var_cluster' +'gke_.*_(?P[\w-]+)' = 'gke-$var_cluster' ``` ## Line Break