[Top][All Lists]

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

Re: Unquoted special characters in regexps

From: Thien-Thi Nguyen
Subject: Re: Unquoted special characters in regexps
Date: 04 Mar 2006 16:07:17 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Luc Teirlinck <address@hidden> writes:

> It is good for users to think of `]' and `-' as characters that
> are special _inside_ the context of a character alternative.

when describing a complicated process (such as the regexp
compiler's operation) it's a common technique to break things down
into independent parts.  that seems to be the approached used in
the docs thus far.  but maybe explaining the role of the square
brace delimiters is not so independent.

my 2c: probably "inside" and "outside" are not as precise as
possible when talking about delimiters (of context or anything),
such as the square braces.  such delimiters "change" the context
(unless somehow inhibited), so that things before or after may be
"inside" or "outside" of the old/new context.

whether or not the delimiter itself is considered inside or outside
depends on whether your pov tends to be forward- or backward-looking
(which is a personal choice, and thus, algorithmically irrelevent).
ascribing context membership to a delimiter is like arguing for
child custody; the delimiter will always be between and no happier
for the label.


reply via email to

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