On 2/11/20 10:12 AM, hv@crypt.org wrote: > I thought we were talking about /foo (?:\K+)/, not /(?:foo \K)+/? > > I had assumed that \K only had to (effectively) set a pointer to what > we're now pretending the match point is, and the second iteration > of a \K{1,2} would just need to set the pointer to that same thing. > > If that's not the case, it would probably help to have a concrete > example We are talking about /foo\K{m,n}bar/ where 'foo' is arbitrary. Already {0,0} is optimized to OPFAIL. The proposal would be to turn any other {0,n} into {0,1}, or more concisely '?', and any other {m,n} into {1,1} or simply \K. (For {1,1}+ there would also have to be a non-backtracking marker added) What should happen if foo contains a code block?Thread Previous | Thread Next