[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make \< and \> match symbol boundaries
From: |
Richard Stallman |
Subject: |
Re: Make \< and \> match symbol boundaries |
Date: |
Mon, 29 Oct 2001 16:53:11 -0700 (MST) |
\_< is like \<
\_> is like \>
\_b is like \b
\_B is like \B
\_w is like \w
\_W is like \W
except that in each case, the variant with `_' uses symbols not words.
I like this approach.
Meanwhile, for more generality, we might want to implement this more
general idea as well:
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.
but using a set of classes or categories rather than just one.
Or we could just write down this plan, and implement it later
if it seems useful enough.
- 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