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: Regexp to find second of three words Date: Wed, 09 Aug 2006 07:22:46 -0700 Message-ID: <8764h2ugy1.fsf@offby1.atm01.sea.blarg.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1155133456 27976 80.91.229.2 (9 Aug 2006 14:24:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 Aug 2006 14:24:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 09 16:24:14 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 1GAoyL-0002ju-7W for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Aug 2006 16:23:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAoyK-0005KB-Lh for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Aug 2006 10:23:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GAoy4-0005HF-5n for help-gnu-emacs@gnu.org; Wed, 09 Aug 2006 10:23:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GAoy3-0005Fw-63 for help-gnu-emacs@gnu.org; Wed, 09 Aug 2006 10:23:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GAoy3-0005Fk-35 for help-gnu-emacs@gnu.org; Wed, 09 Aug 2006 10:23:31 -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 1GAp2k-0001vc-Gc for help-gnu-emacs@gnu.org; Wed, 09 Aug 2006 10:28:22 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GAoxn-0002cm-9Y for help-gnu-emacs@gnu.org; Wed, 09 Aug 2006 16:23:15 +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 ; Wed, 09 Aug 2006 16:23:15 +0200 Original-Received: from offby1 by q-static-138-125.avvanta.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Aug 2006 16:23:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 18 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.51 (gnu/linux) Cancel-Lock: sha1:Hn4rG5juvw8pS+oSLsZbP+sD52A= 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:36579 Archived-At: > (let ((p (rx "set" > (one-or-more space) "'" (group (one-or-more (or alnum (any "*-_.")))) > (one-or-more space) (or "def" "does" "func" "function" "has" "lfinc" "sub"))) > (input "set 'printf function")) > > (string-match p input) > (match-string 1 input)) Very interesting. This is a very different approach. Not really. The only difference is the syntax. -- "New York Minute" is a textbook example of a film created as a "vehicle" but without any ideas about where the vehicle should go. -- Roger Ebert