From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Hanchrow Newsgroups: gmane.emacs.help Subject: Re: Help with query-replace-regular expression Date: Mon, 11 Sep 2006 08:37:47 -0700 Message-ID: <87wt8a4do4.fsf@offby1.atm01.sea.blarg.net> References: <1157980933.187942.311270@i42g2000cwa.googlegroups.com> <87pse2ijtt.fsf@lse.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157989182 16172 80.91.229.2 (11 Sep 2006 15:39:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2006 15:39:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 11 17:39:41 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GMnsQ-0000bE-Rp for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Sep 2006 17:39:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMnsQ-00068J-D5 for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Sep 2006 11:39:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GMnsE-000687-QH for help-gnu-emacs@gnu.org; Mon, 11 Sep 2006 11:39:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GMnsD-00067i-F4 for help-gnu-emacs@gnu.org; Mon, 11 Sep 2006 11:39:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMnsD-00067d-8p for help-gnu-emacs@gnu.org; Mon, 11 Sep 2006 11:39:01 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GMntV-0008Jh-Ia for help-gnu-emacs@gnu.org; Mon, 11 Sep 2006 11:40:21 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GMnro-0000UB-4M for help-gnu-emacs@gnu.org; Mon, 11 Sep 2006 17:38:36 +0200 Original-Received: from q-static-138-125.avvanta.com ([206.124.138.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Sep 2006 17:38:36 +0200 Original-Received: from offby1 by q-static-138-125.avvanta.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Sep 2006 17:38:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 10 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: q-static-138-125.avvanta.com User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:oqz0r8H8cWcPQApIQO9tVbi6ddI= 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:37293 Archived-At: Or escape "escape hell" and let "rx" write the regexp for you: (rx "/*#" (group (or (any alpha) "_") (or (any alnum) "_")) "#*/") That evaluates to "\\(?:/\\*#\\(\\(?:\\(?:[[:alpha:]]\\)\\|_\\)\\(?:\\(?:[[:alnum:]]\\)\\|_\\)\\)#\\*/\\)" -- The only form of intelligence that really matters is the capacity to predict. -- Colin Blakemore