[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modern regexes in emacs
From: |
Mattias Engdegård |
Subject: |
Re: modern regexes in emacs |
Date: |
Fri, 15 Feb 2019 17:24:18 +0100 |
15 feb. 2019 kl. 15.18 skrev Eli Zaretskii <address@hidden>:
>
> It should be possible if we introduce new functions for PCRE, or if we
> mark PCRE regexps in some special way, like put a special text
> property on the string.
It would be easier if those who ask for PCRE would say exactly what they want:
(1) The syntax of PCRE -- | () {} instead of \| \(\) \{\} etc -- but restricted
to the set of features of the Emacs regexp engine.
(2) The features of PCRE not present in Emacs regexps. Which ones, exactly?
Lookbehind assertions? Atomic groups?
(3) PCRE for interactive use only.
(4) PCRE for general Elisp programming.
Locating and wrapping the places that ask for regexps interactively, such as
`query-replace-regexp', would permit the interactive regexp syntax to become a
simple user customisation -- traditional, PCRE, rx or whatnot. It would be a
matter of writing a transformation function, and possibly some syntax
highlighting, for each case.
I wouldn't be surprised if 99% of the requests are really about not having to
escape |(){} as metacharacters in interactive use.
- Re: modern regexes in emacs, Philippe Vaucher, 2019/02/09
- Re: modern regexes in emacs,
Mattias Engdegård <=
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Alan Mackenzie, 2019/02/15
- RE: modern regexes in emacs, Drew Adams, 2019/02/15
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Jay Kamat, 2019/02/15
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Jay Kamat, 2019/02/15
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/15
- Re: modern regexes in emacs, Mattias Engdegård, 2019/02/15
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/15