From: Martin Stone Davis <m0davis@pacbell.net>
Subject: Re: Regexp to match any character, including newline?
Date: Sun, 05 Oct 2003 00:09:09 -0700 [thread overview]
Message-ID: <blog2k$q75$1@sea.gmane.org> (raw)
In-Reply-To: <m33ce87gol.fsf@defun.localdomain>
Jesper Harder wrote:
> Also, look at the very cool 'rx' package, which provides a much nicer
> syntax for regexps than the usual line noise. For instance:
>
> (rx (and "(" (* anything) "and" (* anything)
> (in "1-2") (repeat 4 digit) (* anything) ")"))
> =>
> "\\(?:(\\(?:.\\|
> \\)*and\\(?:.\\|
> \\)*[1-2][[:digit:]]\\{4\\}\\(?:.\\|
> \\)*)\\)"
omfg that is the best!
Is this documented anywhere? I was able to find out about it by typing
M-x apr <RET> rx <RET>
but it is not anywhere in the Elisp info files. I'm sure there are
other gems like it in emacs, so how should I go about finding them?
-Martin
next prev parent reply other threads:[~2003-10-05 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-04 22:02 Regexp to match any character, including newline? Joe Fineman
2003-10-04 22:46 ` Stefan Monnier
2003-10-04 22:59 ` Jesper Harder
2003-10-05 7:09 ` Martin Stone Davis [this message]
[not found] ` <mailman.1130.1065337789.21628.help-gnu-emacs@gnu.org>
2003-10-05 20:35 ` Jesper Harder
2003-10-05 21:45 ` Joe Fineman
2003-10-06 8:20 ` Gian Uberto Lauri
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='blog2k$q75$1@sea.gmane.org' \
--to=m0davis@pacbell.net \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).