help-gnu-emacs
[Top][All Lists]
Advanced

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

[OT] Re: Raw strings (experimental patches inside)


From: Jambunathan K
Subject: [OT] Re: Raw strings (experimental patches inside)
Date: Fri, 10 Aug 2012 11:37:47 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Thought I would post this to help-gnu-emacs.

> It's hard to see how they can be simplified -- as used in all
> languages I know, regexps are extremely compact notation.

If someone is comfortable with lisp-sytax, one can use `rx' and
`rx-to-string' etc to create intuitive and human-readable regexps.

In re-builder, with `reb-re-syntax' set to `re', an expression like this

    '(one-or-more ?\n)

with a `reb-re-copy' leads to a fairly difficult to decode regex like
this:

    "\\(?:
    +\\)"

It is easy to guess what the first one does.  Not so easy, with the
second one.

This together with some rote-learning like - if there are
two-backslashes replace them with a single-backslash or vice-versa -
will get one reasonably very far.
-- 



reply via email to

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