I can't get your count of 5 for AAA

Assuming his spaces are significant, there are 5.

But there are 3 "ACA"s. And that's what he said. My bad.

-sauoq
"My two cents aren't worth a dime.";

In reply to Re^2: Regex: finding all possible substrings by sauoq
in thread Regex: finding all possible substrings by ssc11008

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":