emacs-devel
[Top][All Lists]
Advanced

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

Re: Scan of regexps in Emacs (March 17)


From: Stephen Leake
Subject: Re: Scan of regexps in Emacs (March 17)
Date: Fri, 22 Mar 2019 05:26:06 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

Stefan Monnier <address@hidden> writes:

> I wonder why the doc doesn't just say that `-` should be the last
> character and not mention the other possibilities which just make the
> rule unnecessarily complex.

I recently ran into a problem with this; I had a regexp with `-' at the
end, then edited it to add another range, without noticing the trailing
`-':

before: [0-9a-zA-Z_-]
after: [0-9a-zA-Z_-\x80-\U0010FFFF]

This is _not_ what I wanted.

So putting it first is better. It does not conflict with putting `]'
first;

[]-...]

is unambiguous.

-- 
-- Stephe



reply via email to

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