Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Robert Elz Newsgroups: gnu.bash.bug Subject: Re: quote removal issues within character class Date: Sat, 09 Nov 2019 06:52:22 +0700 Lines: 28 Approved: bug-bash@gnu.org Message-ID: References: <16736.1573257142@jinx.noi.kre.to> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1573257333 27597 209.51.188.17 (8 Nov 2019 23:55:33 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: =?UTF-8?B?T8SfdXo=?= Envelope-to: bug-bash@gnu.org In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 202.29.151.3 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <16736.1573257142@jinx.noi.kre.to> X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:15578 Date: Sat, 9 Nov 2019 00:50:52 +0300 From: =?UTF-8?B?T8SfdXo=?= Message-ID: These two | v=foo | echo ${v#[[:"lower":]]} | case foo in (*[![:"lower":]]*) echo bar; esac are because bash believes that the character class name must not be quoted (which is likely to be clarified to be incorrect in the next revision of posix). This one | case foo in (*[![":lower":]]*) echo bar; esac is correct, as "foo" does not contain a ']' which would be required to match there (quoting the ':' means there is no character class, hence we have instead (the negation of) a char class containing '[' ':' 'l' 'o' 'w' 'e' ';r' (and ':' again), preceded by anything, and followed by ']' and anything. foo does not match. f]oo would. kre