| Subject: | RE: Regular expression match |
|---|---|
| From: | "Timothy Schaeffer" |
| Date: | Thu, 5 Nov 2009 10:00:39 -0500 |
| Newsgroups: | gnu.emacs.help |
> Pascal J. Bourguignon wrote: > > Qiang <mcknight0219@xxxxxxxxx> 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 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Basic questions about elisp, Pascal J. Bourguignon |
|---|---|
| Next by Date: | Re: Basic questions about elisp, David Kastrup |
| Previous by Thread: | Re: Regular expression match, Pascal J. Bourguignon |
| Next by Thread: | Problem with braces in C, Burkhard Schultheis |
| Indexes: | [Date] [Thread] [Top] [All Lists] |