Re: [pcre-dev] 'Hard' partial matching don't work with some …

Pàgina inicial
Delete this message
Autor: ND
Data:  
A: Pcre-dev
Assumpte: Re: [pcre-dev] 'Hard' partial matching don't work with some assertions

>
> I have read the thread. In it you say "Now PCRE scans 'a', then scans
> 'bcd', then want to check next symbol,"...
>             ^^^^^^^^^^^^^^^^^^^^^^^^^
> In the patterns you started this thread with (e.g. "$") PCRE does NOT
> want to check the next symbol, because it has reached the end of the
> pattern successfully. Whenever PCRE reaches the end of the pattern
> successfully, it returns MATCH.

>
> I am sorry that we are having such a lot of misunderstandings over this.
> However, the code of PCRE does what it is specified to do, and I am
> afraid that this will not change.
>


'want to check next symbol'. Yes, all of my examples are lookahead
assertions. And in case of partial 'hard' PCRE MUST try to check next
symbol (or it absence) to say: 'this assertion is match or not'. May be
you addles 'hard' with 'soft' partial?
For example, pattern '.*' returns 'PCRE_ERROR_PARTIAL', but PCRE 'reaches
the end of the pattern successfully'. And this behaviour is right for
'hard' partial matching but wrong for 'soft'.
Please don't refer many a time to same documentation sentence. I
understand that it fits to present PCRE behaviour. But I propose to change
this behaviour because it needed to process multisegment strings (only for
this purposes 'hard' partial option was added to PCRE). This must not
affect 'soft' partial that works as you talk. Partial 'hard' option - is
one-legged solution else.