[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make \< and \> match symbol boundaries
From: |
Paul Eggert |
Subject: |
Re: Make \< and \> match symbol boundaries |
Date: |
Sun, 28 Oct 2001 12:33:34 -0800 (PST) |
> From: Richard Stallman <address@hidden>
> Date: Sun, 28 Oct 2001 07:06:39 -0700 (MST)
>
> I think it would be better to introduce some other way of
> specifying a symbol boundary search. Perhaps \[ amd \].
\[ is already taken; it matches [. \{ is also taken.
We're getting a bit short of ASCII characters, so I'm not sure it's
wise to reserve two more escape sequences for this.
Here's another idea: generalize the existing regexps \b, \B, etc. to
support arbitrary classes and syntaxes, not just word syntax. For
example, to generalize \b we could add the following regexps:
\-bsC matches the empty string, but only at the beginning or end of a
sequence of one or more characters whose syntax is C.
\-bSC matches the empty string, but only at the beginning or end of a
sequence of one or more characters whose syntax is not C.
\-bcC matches the empty string, but only at the beginning or end of a
sequence of one or more characters that belongs to the category C.
\-bCC matches the empty string, but only at the beginning or end of a
sequence of one or more characters that do not belong to the category C.
\b is equivalent to \-bsw.
If we take this approach, then \-<s_ and \->s_ would have the desired
interpretation of matching symbol boundaries.
- Re: idea -> internal frames?, (continued)
Re: idea -> internal frames?, Jason Rumney, 2001/10/26
Re: idea -> internal frames?, Kevin A. Burton, 2001/10/24
Re: Make \< and \> match symbol boundaries, Stefan Monnier, 2001/10/28
Re: Make \< and \> match symbol boundaries, Paul Eggert, 2001/10/28
Re: Make \< and \> match symbol boundaries, Stefan Monnier, 2001/10/28
Re: Make \< and \> match symbol boundaries, Miles Bader, 2001/10/29