On 5/17/17 10:52 AM, Eduardo Bustamante wrote: > Then in "9.3.5 RE Bracket Expression" > (http://pubs.opengroup.org/onlinepubs/9699919799.2008edition/basedefs/V1_chap09.html#tag_09_03_05), > > The character sequences "[." , "[=" , and "[:" ( <left-square-bracket> > followed by a <period>, <equals-sign>, or <colon>) shall be special inside > a bracket expression and are used to delimit collating symbols, > equivalence > class expressions, and character class expressions. These symbols shall be > followed by a valid expression and the matching terminating sequence ".]" > , > "=]" , or ":]" , as described in the following items.
I read this as saying that it's a requirement on the application to ensure that character classes are correctly formed, and it's unspecified behavior if they're not. So you're right: people should not count on shells treating improperly- formed character classes as literal characters. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/