8 Replies Latest reply on May 17, 2012 8:56 AM by mbraendle

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

    sjul

      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?