From: "Timothy Schaeffer" <tschaeffer@dramail.com>
To: <help-gnu-emacs@gnu.org>
Subject: RE: Regular expression match
Date: Thu, 5 Nov 2009 10:00:39 -0500 [thread overview]
Message-ID: <138905EB75AB0D44B6A0ECD251A92EA70131A630@sdra00198.intranet.dra-inc.net> (raw)
In-Reply-To: <hcun3d$vbi$1@ger.gmane.org>
> Pascal J. Bourguignon wrote:
> > Qiang <mcknight0219@gmail.com> writes:
> >
> >> I am trying to use regular expression in Emacs. And I have question
> > Using groups and match-string. For example:
> >
> > (when (re-search-forward "Vol.\(8\)")
> > (match-string 1))
>
> The regexp string should be "Vol\\.\\(8\\)"
And you can avoid emacs' regexp-in-strings hyperquoting with the rx macro.
(rx "Vol." (group "8")) = "Vol\\.\\(8\\)"
Tim S
next prev parent reply other threads:[~2009-11-05 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.10104.1257397298.2239.help-gnu-emacs@gnu.org>
2009-11-05 5:23 ` Regular expression match Pascal J. Bourguignon
2009-11-05 14:22 ` Kevin Rodgers
2009-11-05 15:00 ` Timothy Schaeffer [this message]
[not found] ` <mailman.10127.1257432106.2239.help-gnu-emacs@gnu.org>
2009-11-05 17:19 ` Pascal J. Bourguignon
2009-11-05 5:02 Qiang
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=138905EB75AB0D44B6A0ECD251A92EA70131A630@sdra00198.intranet.dra-inc.net \
--to=tschaeffer@dramail.com \
--cc=help-gnu-emacs@gnu.org \
/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).