Wacek Kusnierczyk <[email protected]> writes:

> if, as you seem to imply, the pattern is 'a non-backslash followed by a
> closing bracket', then
> - the rightmost closing bracket is *outside* of any class (the class
> [^\] has been closed), thus

Right.

> - it is (should be) a *metacharacter*, and and as such

Wrong.

> - it must be taken as *closing a class*, which is not there and it
> neither should match the closing bracket in the data (which it does in
> some of the other examples)

The ']' character is only special when part of a bracket expression.  In
all other contexts it just matches itself.

Andreas.

-- 
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply via email to