diff options
author | Tom Fenech <tomjwfenech@gmail.com> | 2023-02-20 13:22:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 13:22:15 +0100 |
commit | c8bb1bae8d55cb462e3fc25aeee8dd60eae14c54 (patch) | |
tree | d3b81e4a2ac7906a3d50fb18108911456a93468a /docs/config/README.md | |
parent | 61b01dacd71e50a57e3badb65326216fe70f55ab (diff) |
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 `-`.
Diffstat (limited to 'docs/config/README.md')
-rw-r--r-- | docs/config/README.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 8e8fc778b..e7e0766be 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<var_cluster>[\\w-]+)' = 'gke-$var_cluster' +'gke_.*_(?P<var_cluster>[\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<var_cluster>[\\w-]+)/.*' = '$var_cluster' +'.*/(?P<var_cluster>[\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<var_cluster>[\\w-]+)' = 'gke-$var_cluster' +'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster' ``` ## Line Break |