Re: [PATCH] expand: Recognize '^' as a negation character in BE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/07/2021 11:00, Harald van Dijk wrote:
> On 16/07/2021 10:42, Dimitar Yurukov wrote:
> > While parsing bracket expression ('[...]'), DASH recognizes only '!' as
> > a special character for negation/inversion, but POSIX specifies '^'.
> > 
> > The POSIX specification (2018 edition) states:
> > 
> >    ^ The <circumflex> shall signify a non-matching list expression when
> >      it occurs first in a list, immediately following a
> >      <left-square-bracket> (see RE Bracket Expression).
> 
> It also states:
> 
>    the <exclamation-mark> character ( '!' ) shall replace the
> <circumflex> character ( '^' ) in its role in a non-matching list in the
> regular expression notation
> 
> and
> 
>    A bracket expression starting with an unquoted <circumflex> character
> produces unspecified results.
> 
> See 2.13.1 Patterns Matching a Single Character.

Oh, my bad, sorry for the noise.

> The patch may still be worthwhile to increase compatibility, but in that
> case the same change also needs to be made to expmeta().

Oops, you are right. Will attach v2.



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux