From 855e3c753870d7d6e7acefb39c5e40ca3199777f Mon Sep 17 00:00:00 2001 From: maxnikulin Date: Tue, 18 Apr 2023 18:38:55 +0700 Subject: [PATCH] SC3026: alternative correct code to match ^ --- SC3026.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SC3026.md b/SC3026.md index 651c8ed..d1a8d49 100644 --- a/SC3026.md +++ b/SC3026.md @@ -11,6 +11,10 @@ echo foo-[^0]*.jpg ```sh echo foo-[!0]*.jpg ``` +or if the intention is to match `^` literally then either do not put it immediately after `[` or quote it by backslash `\` +```sh +echo foo-[0^]*.jpg foo-[\^0]*.jpg +``` ### Rationale: