Date:        Fri, 13 Apr 2018 15:07:07 +0100
    From:        Geoff Clare <>
    Message-ID:  <20180413140707.GB19570@lt2.masqnet>

  | Bracket expressions are not only used in REs and the shell.  There are
  | also fnmatch(), glob(), find and pax to consider, where shell quoting
  | does not apply. 

They are used by glob (in the generic sense) and by REs (differently).
All the other examples you cite are glob patterns, and all refer to the
sh implementation.

Sure the quoting needs to be made clear, but none of this needs to
in any way impact upon REs or baracket expressions in REs.

  | For those the only difference from REs is the '^' -> '!'  one,

Not for fnmatch() which can have \ to escape characters (anywhere
according to its description, which would include in bracket expressions,
as that is not excluded.   The others just refer to XCU 2.13 and don't
say what they expect in this regard from what I can tell.

What's more, I'm not sure what they should say, I've never wanted to
use quoting in a bracket expression, as I know how to use them wihout
that, and just always do it that way.

  | It is true of glob patterns as used by fnmatch(), glob(), find and pax.

It is certainly not true of fnmatch() unless it has the FNM_NOESCAPE
flag is set - though, and for the others, as above, at least according to
what the standard says, I just don't know.   True only sh uses quotation
marks as quoting methods, but that can be handled separately (indeed
it must be, however things are combined together.)


Reply via email to