[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rx.el sexp regexp syntax
From: |
Michael Heerdegen |
Subject: |
Re: rx.el sexp regexp syntax |
Date: |
Fri, 25 May 2018 23:01:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
> A string regexp, by contrast, usually fits onto a single line.
But regexps are tree-like structures. That's why rx, which uses sexps
(i.e. trees), is the easier to read representation for complicated
regexps than a one-dimensional string. Unless you have the ability to
form a representation in your head.
> The "English" counterpart used in rx is bulky and difficult to learn.
> Somehow, you've got to learn that it's "word-start" and not
> "word-beginning", that it's "not" and not "non", and so on.
That's IMHO the main reason why people avoid using rx. I wonder if that
aspect of rx could be improved (why not just use $ as synonym for bol
etc.)?
> This is more difficult than just learning \< and ^. If your native
> language isn't English, it might be much more difficult.
But also because you read the former more often.
OTOH btw, I find the documentation for rx more condensed than that of
the syntax of regexps.
In summary, I think both representations have their justification of
existence.
Michael.
- Re: rx.el sexp regexp syntax, (continued)
- Re: rx.el sexp regexp syntax, Robert Pluim, 2018/05/29
- Re: rx.el sexp regexp syntax, Philipp Stephani, 2018/05/29
- Re: rx.el sexp regexp syntax, Richard Stallman, 2018/05/29
- Re: rx.el sexp regexp syntax, Robert Pluim, 2018/05/30
- Re: rx.el sexp regexp syntax, Richard Stallman, 2018/05/30
- Re: rx.el sexp regexp syntax, Robert Pluim, 2018/05/31
- Re: rx.el sexp regexp syntax, Clément Pit-Claudel, 2018/05/31
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/31
- RE: rx.el sexp regexp syntax, Drew Adams, 2018/05/31
- Re: rx.el sexp regexp syntax (WAS: Off Topic), Alan Mackenzie, 2018/05/25
- Re: rx.el sexp regexp syntax,
Michael Heerdegen <=
- Re: rx.el sexp regexp syntax, Peter Neidhardt, 2018/05/25
- Re: rx.el sexp regexp syntax (WAS: Off Topic), Peter Neidhardt, 2018/05/25
- Re: rx.el sexp regexp syntax, Tom Tromey, 2018/05/27
- Re: rx.el sexp regexp syntax, Alan Mackenzie, 2018/05/27
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/27
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/27
- Re: rx.el sexp regexp syntax, Pierre Neidhardt, 2018/05/28
- Re: rx.el sexp regexp syntax, Stefan Monnier, 2018/05/28