From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Timothy Schaeffer" Newsgroups: gmane.emacs.help Subject: RE: Regular expression match Date: Thu, 5 Nov 2009 10:00:39 -0500 Message-ID: <138905EB75AB0D44B6A0ECD251A92EA70131A630@sdra00198.intranet.dra-inc.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257459192 5770 80.91.229.12 (5 Nov 2009 22:13:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Nov 2009 22:13:12 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 05 23:13:05 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N6AZk-0001K8-47 for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Nov 2009 23:13:04 +0100 Original-Received: from localhost ([127.0.0.1]:46558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6AZj-0000lf-Hw for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Nov 2009 17:13:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N64KS-0004gt-HO for help-gnu-emacs@gnu.org; Thu, 05 Nov 2009 10:32:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N64KO-0004ep-0P for help-gnu-emacs@gnu.org; Thu, 05 Nov 2009 10:32:52 -0500 Original-Received: from [199.232.76.173] (port=41304 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N64KN-0004ei-RV for help-gnu-emacs@gnu.org; Thu, 05 Nov 2009 10:32:47 -0500 Original-Received: from dramail.com ([66.195.237.160]:10351 helo=sdra00198.intranet.dra-inc.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N64KN-0007lZ-GD for help-gnu-emacs@gnu.org; Thu, 05 Nov 2009 10:32:47 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Regular expression match thread-index: AcpeJy6qW/HkpuUkRDGBl5a1ZFzgngAATNbQ X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-Greylist: delayed 1926 seconds by postgrey-1.27 at monty-python; Thu, 05 Nov 2009 10:32:46 EST X-Mailman-Approved-At: Thu, 05 Nov 2009 17:07:46 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69519 Archived-At: > Pascal J. Bourguignon wrote: > > Qiang writes: > >=20 > >> I am trying to use regular expression in Emacs. And I have question = > > Using groups and match-string. For example: > >=20 > > (when (re-search-forward "Vol.\(8\)") > > (match-string 1)) >=20 > The regexp string should be "Vol\\.\\(8\\)" And you can avoid emacs' regexp-in-strings hyperquoting with the rx = macro. (rx "Vol." (group "8")) =3D "Vol\\.\\(8\\)" Tim S