Re: clisp, regexp:match, and subgroups? [SOLVED]



On Wednesday, May 2, 2012 4:10:29 PM UTC-4, Mike wrote:
On 2012-05-02, Mike <mikee@xxxxxxx> wrote:
On 2012-05-02, Mirko Vukovic <mirko.vukovic@xxxxxxxxx> wrote:
On Wednesday, May 2, 2012 12:49:52 PM UTC-4, Mike wrote:
Thank you everyone on my previous (loop...) question. I understand now
more than I did. My next stumbling stone is (regexp:match...). I have
this function where it is matching a pattern. I'm trying to extract
that pattern. I found where the POSIX regexps will match subgroups.
Great. I have the matching working. Now, how do I see any subgroup other
than the first one? I found a mention of a (multi-value-bind...),
but clisp says that function doesn't exist. How do I access the
other-than-first matches?

Mike

multiPLE-value-bind

Mirko,

Thank you. Do you have an example of using it?

Mike

Turns out I can do it this way:

(regexp:match-start (cadr (multiple-value-list (regexp:match pattern z))))

I got this hint from: <http://www.lispworks.com/documentation/HyperSpec/Body/f_vals_l.htm>

Mike

You got it - hyperspec is your friend :-)
.



Relevant Pages

  • help with regex matching multiple %e
    ... I would like to extract all the numbers. ... From the python website i got the ... following expression for matching what in c is %e (i.e. scientific ... Is there any way to repeat this pattern to get me all the numbers in the ...
    (comp.lang.python)
  • Re: clisp, regexp:match, and subgroups? [SOLVED]
    ... this function where it is matching a pattern. ... I'm trying to extract ... I found where the POSIX regexps will match subgroups. ... I have the matching working. ...
    (comp.lang.lisp)
  • Re: clisp, regexp:match, and subgroups? [SOLVED]
    ... this function where it is matching a pattern. ... I'm trying to extract ... I found where the POSIX regexps will match subgroups. ... I have the matching working. ...
    (comp.lang.lisp)
  • Re: clisp, regexp:match, and subgroups?
    ... this function where it is matching a pattern. ... I'm trying to extract ... I found where the POSIX regexps will match subgroups. ... I have the matching working. ...
    (comp.lang.lisp)
  • Re: clisp, regexp:match, and subgroups?
    ... this function where it is matching a pattern. ... I'm trying to extract ... I found where the POSIX regexps will match subgroups. ... I have the matching working. ...
    (comp.lang.lisp)