all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: Vr Rm <vrrm00@gmail.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: [OT] Re: Raw strings (experimental patches inside)
Date: Fri, 10 Aug 2012 11:37:47 +0530	[thread overview]
Message-ID: <87txwb5lfw.fsf_-_@gmail.com> (raw)
In-Reply-To: <87wr1749m0.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Fri, 10 Aug 2012 14:08:39 +0900")


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	other threads:[~2012-08-10  6:07 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03  2:02 Raw strings (experimental patches inside) Aurélien Aptel
2012-08-03  9:45 ` Pascal J. Bourguignon
2012-08-03 17:45   ` Aurélien Aptel
2012-08-04 19:41     ` Pascal J. Bourguignon
2012-08-05  0:16       ` Aurélien Aptel
2012-08-05 11:36         ` Pascal J. Bourguignon
2012-08-05  7:13       ` Lars Brinkhoff
2012-08-06  1:55       ` Stefan Monnier
2012-08-06 10:55         ` Pascal J. Bourguignon
2012-08-06 16:16           ` Stefan Monnier
2012-08-06 16:40             ` Pascal J. Bourguignon
2012-08-03 22:43 ` Stefan Monnier
2012-08-04 14:38   ` Ivan Andrus
2012-08-04 23:47     ` Stefan Monnier
2012-08-05  0:13       ` Aurélien Aptel
2012-08-06 16:17         ` Stefan Monnier
2012-08-10  1:33       ` Vr Rm
2012-08-10  5:08         ` Stephen J. Turnbull
2012-08-10  6:07           ` Jambunathan K [this message]
2012-08-10 15:13           ` Stefan Monnier
2012-08-10 17:28             ` Stephen J. Turnbull
2012-08-10 18:50               ` Stefan Monnier
2012-08-11  7:27                 ` Stephen J. Turnbull
2012-08-11 11:05                 ` Dmitri Paduchikh
2012-08-12  0:29                   ` Stephen J. Turnbull
2012-08-10 21:11           ` Vr Rm
2012-08-10 23:03             ` Davis Herring
2012-08-10 23:24               ` Learning Emacs regexp (was: Re: Raw strings (experimental patches inside)) chad
2012-08-11  7:39             ` Raw strings (experimental patches inside) Stephen J. Turnbull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txwb5lfw.fsf_-_@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=vrrm00@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.