emacs-devel
[Top][All Lists]
Advanced

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

Re: rx.el sexp regexp syntax


From: Eric Abrahamsen
Subject: Re: rx.el sexp regexp syntax
Date: Fri, 25 May 2018 15:44:25 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Heerdegen <address@hidden> writes:

> Eric Abrahamsen <address@hidden> writes:
>
>> I know, a few hours ago I went hunting in the repos for relevant
>> packages, and found yours. It certainly helps! Though I'd still rather
>> have something that actually transforms the regexps at compile time...
>
> I don't understand what you mean.  rx transforms regexps at compile
> time.

I mean, a macro that lets me write an unescaped regexp that gets
compiled to an escaped regexp. So:

(r "turn (left|right)") compiles to "turn \\(left\\|right\\)"

Basically like python's string literals.




reply via email to

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