[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ugly regexps
From: |
Stefan Monnier |
Subject: |
Re: Ugly regexps |
Date: |
Wed, 03 Mar 2021 10:46:20 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> So you can do
>>
>> (string-match (ere "\\(def(macro|un|subst) .{1,}"))
>>
>> instead of
>>
>> (string-match "(def\\(macro\\|un\\|subst\\) .\\{1,\\}")
>
> Why not use 'rx' in those cases?
Not sure what you mean by "those cases". I'm thinking this `ere` would
be useful for the cases where the author finds `rx` unpalatable for
some reason.
> IMO it makes the regexp even more easy to write and read.
I believe this depends on taste and circumstances. Experience shows
that while some packages use `rx` extensively, most ELisp code doesn't.
Stefan
- Ugly regexps, Stefan Monnier, 2021/03/02
- Re: Ugly regexps, Stefan Kangas, 2021/03/02
- Re: Ugly regexps, Eli Zaretskii, 2021/03/03
- Re: Ugly regexps,
Stefan Monnier <=
- Re: Ugly regexps, Eli Zaretskii, 2021/03/03
- Re: Ugly regexps, Stefan Monnier, 2021/03/03
- Re: Ugly regexps, Stefan Kangas, 2021/03/03
- Re: Ugly regexps, Eli Zaretskii, 2021/03/03
- Re: Ugly regexps, Stefan Kangas, 2021/03/03
- Re: Ugly regexps, Stefan Kangas, 2021/03/03
- Re: Ugly regexps, Stefan Kangas, 2021/03/03
- Re: Ugly regexps, Dmitry Gutov, 2021/03/03
- RE: [External] : Re: Ugly regexps, Drew Adams, 2021/03/03
- RE: [External] : Re: Ugly regexps, Stefan Kangas, 2021/03/03