Autor: George Zhuravlev Data: A: Philip Hazel Assumpte: Re: [pcre-dev] please,
advice me PCRE discussion forums or groups (fwd)
Hello Philip,
Monday, March 26, 2007, 12:02:42 PM, you wrote:
PH> On Sat, 24 Mar 2007, Andrew Ho wrote: >> Another e-mail to webmaster@???. (I'm forwarding them to the list
>> as I get them, so you have the idea that these are not very frequent.) >> ---------- Forwarded message ----------
>> Date: Sun, 25 Mar 2007 01:09:18 +0200
>> From: George Zhuravlev <gera@???>
>> To: webmaster@???
>> Subject: please, advice me PCRE discussion forums or groups
>>
>> Hello webmaster,
>>
>> I have a question in PCRE, but I don't know where can it be asked.
>> Can you help me?
>>
>> If there is a pattern like this
>> "\s(\w(\d.){3})\s"
>> and a subject like this
>> "asd a1.2.3. asd"
>> is there any possibility to iterate
>> through all matches of group "(\d.)"?
>> I mean, I want to know, that group "(\d.)"
>> first matches "1.", then "2." and the last was "3.".
>> How can it be done in PCRE library? PH> It cannot. The iteration must be done in the program that calls PCRE. I have one! (in process of writing, to be exact). But what function calls
can provide me such an information? If I call pcre_get_substring() I only
get the last match of this group - "3.", that's all. Do the PCRE
library store first two matches ("1.", "2.") anywhere? Or is there an
alternative way to get this info?