in reply to Re^2: how to count the number of repeats in a string (really!) [regexp solution]
in thread how to count the number of repeats in a string (really!)

Mistake and mistake. That's not how I interpreted the question. The problem statement is a bit vague on this. For practical purposes I don't think 'aaa' should report 2 x 'aa' as well.

If this is the task however, it's better to just exhaustively match everything of a minimum length. The problem as I (and you?) interpreted it is actually more interesting, I think.

lodin

  • Comment on Re^3: how to count the number of repeats in a string (really!) [regexp solution]