Re: [pcre-dev] Max lookbehind calculation

2019-06-17 Thread ND via Pcre-dev
On 2019-06-17 15:44, ph10 wrote: Why do you expect 4? The matcher goes back 2, then matches two characters, so it is back at the start. Then it goes back 6. You are right, Philip. My fault. I'm sorry. Close thread. -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev

Re: [pcre-dev] Max lookbehind calculation

2019-06-17 Thread ph10
On Mon, 17 Jun 2019, ND via Pcre-dev wrote: > PCRE2 version 10.33 2019-04-16 > /(?<=.{2}(?<=.{6}))/info > Capture group count = 0 > Max lookbehind = 6 > May match empty string > Subject length lower bound = 0 > abc\=ph > No match > > > Expected maxlookbehind=4, not 6. Why do you expect 4? The

Re: [pcre-dev] Quantifying backtracking verbs

2019-06-17 Thread ND via Pcre-dev
It seems you don't understand or I don't. Sorry for my bad English. I don't ask to calculate real subject_length_lower_bound in patterns with ACCEPT. I ask to set subject_length_lower_bound to 0 in all such patterns. On 2019-06-17 15:07, ph10 wrote: If a pattern contains (*ACCEPT) the

[pcre-dev] Max lookbehind calculation

2019-06-17 Thread ND via Pcre-dev
Hello! Here is pcre2test listing: PCRE2 version 10.33 2019-04-16 /(?<=.{2}(?<=.{6}))/info Capture group count = 0 Max lookbehind = 6 May match empty string Subject length lower bound = 0 abc\=ph No match Expected maxlookbehind=4, not 6. May be calculation algorithm could be corrected.

Re: [pcre-dev] Quantifying backtracking verbs

2019-06-17 Thread ph10
On Mon, 17 Jun 2019, ND via Pcre-dev wrote: > I don't so this fix in PCRE2 source code repository. > Is there plans to fix it as it doing with another patterns with ACCEPT? > > For example studying a pattern > > /a(*ACCEPT)/ > > produce > Subject length lower bound = 0 If a pattern contains

[pcre-dev] Supplement docs about partial match

2019-06-17 Thread ND via Pcre-dev
Hello! Chapter ISSUES WITH MULTI-SEGMENT MATCHING of pcre2partial.html includes item 2 with description how to process with lookbehind assertions. I think it's important to add to this algorithm a some words about "no match": If result of partial match is "no match" then last

[pcre-dev] Typo in pcre2test docs about partial match

2019-06-17 Thread ND via Pcre-dev
Hello! In pcre2test docs in chapter RESTARTING AFTER A PARTIAL MATCH there is example: data> 23ja\=P,dfa What matching option "P" is? May be it should be corrected to "ph" or "ps"? Thanks. -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev

Re: [pcre-dev] Quantifying backtracking verbs

2019-06-17 Thread ND via Pcre-dev
On 2019-06-04 16:59, ND wrote: 1. Start optimizer brakes a result to "no match" from "match". Is there documented (I remember only example with (*COMMIT) where optimizer can make "match" from "no match")? May be there is a way to correct this PCRE optimization to not break a result. I

[pcre-dev] Possessive quantifier not work after {1}

2019-06-17 Thread ND via Pcre-dev
Good day! Here is pcre2test listing: PCRE2 version 10.33 2019-04-16 /(?:a|ab){1}+c/ abc 0: abc No match expected, but pattern matched. Thanks. -- ## List details at https://lists.exim.org/mailman/listinfo/pcre-dev

[pcre-dev] Document SKIP position before or equal start_offset

2019-06-17 Thread ND via Pcre-dev
Good day! I don't find in docs behaviour of SKIP when corresponding position is before or equal start_offset. It seems that in this case a "bumpalong" advance is 1, not SKIP or associated MARK position. /(?<=a(*SKIP)x)|c/ abcd\=offset=2 No match /(*SKIP)x|c/ abcd No match