From ... From: Erik Naggum Subject: Re: how to get groups out of match-regexp Date: 2000/08/09 Message-ID: <3174808983514646@naggum.net>#1/1 X-Deja-AN: 656349761 References: <3990BAFB.5042EC77@mail.utexas.edu> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 965830272 11803 195.0.192.66 (9 Aug 2000 14:11:12 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 9 Aug 2000 14:11:12 GMT Newsgroups: comp.lang.lisp * Charlie Benton | Let's say I want to extract the first group from the regular expression | "author: \\(\\w+\\);". Documentation told me that if I set the :return | argument to :string then match-regexp would return a list where the | first group would be the 3rd member. Documentation told you that? That's pretty weird. The same documentation tells me that the third _value_ is the first group. At least if we're talking about the match-regexp that comes with in Allegro CL. | But the commmand (print (nth 2 (match-regexp "author: \\(\\w+\\);" "asdf | author: bentonc;" :return :string))) gives me an error. What am I doing | wrong. Try nth-value instead of nth. (I would suggest you drop the print, too, if you're doing this interactively.) #:Erik -- If this is not what you expected, please alter your expectations.