AnsweredAssumed Answered

PatternCount and Position don't detect overlapping repeats?!?

Question asked by sjul on May 16, 2012
Latest reply on May 17, 2012 by mbraendle

I'm mystified by the following behavior:

 

PatternCount( "xxx" ; "xx" ) returns 1. (I would expect 2.)

 

Position obviously uses the same pattern-matching algorithm:

 

Position( "xxx" ; "xx" ; 1 ; 1 ) returns 1. (OK.)

Position( "xxx" ; "xx" ; 1 ; 2 ) returns 0. (I would expect 2.)

 

Assuming non-overlapping repeats seems pretty limiting to me, and I'm finding it difficult to believe. Am I missing the obvious?

Outcomes