[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ugly regexps
From: |
Helmut Eller |
Subject: |
Re: Ugly regexps |
Date: |
Wed, 03 Mar 2021 08:09:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Tue, Mar 02 2021, Stefan Monnier wrote:
> BTW, while this theme of ugly regexps keeps coming up, how 'bout we add
> a new function `ere` which converts between the ERE style of regexps
> where grouping parens are not escaped (and plain chars meant to match
> an actual paren need to be escaped instead) to ELisp-style regexps?
>
> So you can do
>
> (string-match (ere "\\(def(macro|un|subst) .{1,}"))
Better call it (rx (ere STRING)). Namespace pollution may not be
prohibited by the law but mother Emacs may thank you anyway :-)
Helmut
- Re: Ugly regexps, (continued)
- Re: Ugly regexps, Eli Zaretskii, 2021/03/04
- Re: Ugly regexps, Dmitry Gutov, 2021/03/04
- Re: Ugly regexps, tomas, 2021/03/04
- Re: Ugly regexps, Dmitry Gutov, 2021/03/04
- Re: Ugly regexps, Richard Stallman, 2021/03/05
- Re: Ugly regexps, Dmitry Gutov, 2021/03/05
- Re: Ugly regexps, Richard Stallman, 2021/03/06
- Re: Ugly regexps, Dmitry Gutov, 2021/03/04
- Re: Ugly regexps, Eli Zaretskii, 2021/03/04
- RE: [External] : Re: Ugly regexps, Drew Adams, 2021/03/03
Re: Ugly regexps,
Helmut Eller <=
Re: Ugly regexps, Dmitry Gutov, 2021/03/03
Re: Ugly regexps, Lars Ingebrigtsen, 2021/03/03