--- In [email protected], "entropyreduction" 
<alancampbelllists+ya...@...> wrote:
>
> 
> --- In [email protected], "Sheri" <sherip99@> wrote:
> 
> > > > I think if a user vector handle is provided, something should now
> > > > go into it even if there is no "offsets" option. Ditto if a
> > > > variable name is provided. 
> > > 
> > > Uh..so what goes into variable if present? First element in
> > > vector returned by pcre_exec?
>  
> > No, a string from first element (offset) to the second element
> > (offset) in the subject. The second element will have the offset
> > of end of the subject. The user would need to prepend this string
> > onto the beginning of the next segment to continue searching for
> > a match.
> 
> That sounds like what's meant to go into vector. 
> 
> Do I respect "nocaptures" option if present and not return
> matched subject substring?

Yes

> I assume you want that substring to go into variable if named?

Yes

> 
> Can I assume that pcre_exec will always return an empty vector if
> PCRE_ERROR_PARTIAL returned and pcre version < 8.0? If so means I
> don't have to do a version check, just a "how many elements in
> reteruend offsets vector" check. 

Sounds like that might work ok.

Concerning the offsets option, I think it would be handy at times to be able to 
request the vector be populated with both the starting and ending offset, 
similar to what PCRE provides. Currently we have the option "offsets", but it 
populates only one element in hVec (starting offset) - which by itself is 
useless without the ending offset or the length of the string. What would you 
think of adding a new option, such as "both_offsets"? Together with 
"nosubstrings" the vector would be similar to PCRE's (but I guess 1-based 
instead of zero-based, consistent with existing "offsets" option). With 
"nosubstrings" and "nocaptures" it would have two elements instead of one.

Regards,
Sheri

Reply via email to