[Top][All Lists]

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

RE: rx.el sexp regexp syntax

From: Drew Adams
Subject: RE: rx.el sexp regexp syntax
Date: Thu, 31 May 2018 08:43:27 -0700 (PDT)

> The verbosity for me is not so much in the identifier as in the "( ID
> SPC ) SPC" and the need for quotation marks to surround actual
> characters.  So for example the string's single-char * turns into
> a 5-char * in RX.
> I really like the regularity, extensibility, and clear structure of RX,
> but in practice it makes the regexps too long: short regexps are
> simple enough that RX's advantages don't get a chance to shine, and more
> complex regexps are made to spread too many lines for comfort.
> That doesn't mean I don't like RX, by the way.  Just that I expected I'd
> really love it, and in the end I never use it because I never find it to
> be significantly better (I do think it's significantly better when you
> need to manipulate it programmatically, of course, which is why lex.el
> takes an RX syntax as input).

This summary applies for me, as well.

Functions that transform a regexp string to an RX sexp and vice
versa would be very helpful.

Given such functions, I might use RX and the show-me-the-regexp
function to create a regexp string, which I'd leave in the code,
and I might use the show-me-the-RX function when I need to change
such a string (or think about it).

reply via email to

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