help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp question


From: Sergei Steshenko
Subject: Re: regexp question
Date: Wed, 7 Dec 2011 06:06:43 -0800 (PST)




----- Original Message -----
> From: Philip Nienhuis <address@hidden>
> To: Sergei Steshenko <address@hidden>
> Cc: "address@hidden" <address@hidden>
> Sent: Tuesday, December 6, 2011 10:00 PM
> Subject: Re: regexp question
> 
[snip]
> How do I get $2?
[snip]
> Philip
>

I have no idea. I mean, I haven't used PCRE, I used regular expressions in 
Perl. So the answer is somewhere in PCRE and Octave documentation.
...
Looking into http://www.pcre.org/pcre.txt I see:

In  addition  to  the  main compiling and matching functions, there are
       convenience functions for extracting captured substrings from a subject
       string that is matched by pcre_exec(). They are:

         pcre_copy_substring()
         pcre_copy_named_substring()
         pcre_get_substring()
         pcre_get_named_substring()
         pcre_get_substring_list()
         pcre_get_stringnumber()
         pcre_get_stringtable_entries()

       pcre_free_substring() and pcre_free_substring_list() are also provided,
       to free the memory used for extracted strings.

- I think this is the piece to start from.

Regards,
  Sergei.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]