in reply to Regex: finding all possible substrings
What have you tried? What didn't work? We are not a code writing service.
If you need to generate permutations, you can do that pretty easily with glob. That combines with regular expressions pretty easily - have you read perlretut? Also, for your example, I can't get your count of 5 for AAA -- I see either 4 or 6 depending on how you count overlaps.
Update: Stupid failing eyes. I counted two AAAs in the third word.
Node text goes above. Div tags should contain sig only
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.