[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Manual: Incorrect explanation of /\B/
From: |
Neil R. Ormos |
Subject: |
Re: Manual: Incorrect explanation of /\B/ |
Date: |
Wed, 7 Sep 2022 14:11:15 -0500 (CDT) |
Wolfgang Laun wrote:
> Currently we have this text (in 3.7):
> Matches the empty string that occurs between two
> word-constituent characters. For example,
> /\Brat\B/ matches 'crate', but it does not match
> 'dirty rat'. '\B' is essentially the opposite of
> '\y'.
> It should read:
> Matches when not at a word boundary, i.e.,
> within a word or whenever both of the adjoining
> characters are not a word character. For
> example, /\Brat\B/ matches 'crate', but it does
> not match 'dirty rat', or /\B/ matches 4 places
> in '///'. '\B' is essentially the opposite of
> '\y'.
I was confused by the "opposite" language in the manual and suggest that the
last sentence be amended to read,
'\B' is essentially the opposite of '\y' in that '\B' matches anywhere '\y'
does not match.