|
From: | Eric Hanchrow |
Subject: | Re: Regexp to find second of three words |
Date: | Wed, 09 Aug 2006 07:22:46 -0700 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.51 (gnu/linux) |
> (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
[Prev in Thread] | Current Thread | [Next in Thread] |