bug-grep
[Top][All Lists]
Advanced

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

Re: [^\]] in basic regexes


From: Andreas Schwab
Subject: Re: [^\]] in basic regexes
Date: Sat, 14 Feb 2009 11:01:08 +0100
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux)

Wacek Kusnierczyk <address@hidden> writes:

> however, in that code the pattern was '[^\]]*' (with the idea that the
> character ']' is a metacharacter and therefore must be escaped). 

Inside bracket expressions the backslash is not special.  Thus '[^\]]'
is a pattern that matches a non-backslash character followed by ']', and
'[\]' does not qualify.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
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

[Prev in Thread] Current Thread [Next in Thread]