Another mention I'd make is that if some changes would be needed to the subs - like for example considering at least MIN_REPEATS repetitions of a string to be counted - I'm afraid it might be rather challenging in modifying the RX-ish solutions.
I've updated my original reply to include minimum substring length and minimum matched patterns. It would be interesting to see our and the other subroutines benchmarked against each other with this addition.
lodin
In reply to Re^6: how to count the number of repeats in a string (really!)
by lodin
in thread how to count the number of repeats in a string (really!)
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |