From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stone Davis Newsgroups: gmane.emacs.help Subject: Re: Regexp to match any character, including newline? Date: Sun, 05 Oct 2003 00:09:09 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1065337837 26957 80.91.224.253 (5 Oct 2003 07:10:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Oct 2003 07:10:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 05 09:10:35 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A632J-0002Ej-00 for ; Sun, 05 Oct 2003 09:10:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A631j-0006M6-CK for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Oct 2003 03:09:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A631X-0006J1-5R for help-gnu-emacs@gnu.org; Sun, 05 Oct 2003 03:09:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A630w-0005lW-Mw for help-gnu-emacs@gnu.org; Sun, 05 Oct 2003 03:09:41 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A630w-0005kW-95 for help-gnu-emacs@gnu.org; Sun, 05 Oct 2003 03:09:10 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A630v-0000Ic-00 for ; Sun, 05 Oct 2003 09:09:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A630u-0000IU-00 for ; Sun, 05 Oct 2003 09:09:08 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1A630u-0006z8-00 for ; Sun, 05 Oct 2003 09:09:08 +0200 Original-Lines: 24 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: en-us, en In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12994 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12994 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 rx 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