I am a beginner and I want to know that how to determine if a string contains characters which are re-occuring in a pattern.

Example: "aabcdabcdabcdabcd"
Here four characters - 'abcd' ore getting repeated.
But I do not know that how many characters are getting repeated.

The pattern is not certain. I do not know it. "abcd is just" an example.
The pattern can be in any order
Please help.
My code is :

I don't actually know the string!

```
s1=str("aabcdabcdabcd")
x=0
z=""
for i in range (1,len(s1)):
    z=s1[i:i+5]
    s1.replace(z,"",1)
    if z in s1:
          x+=1
    if x!=0:
          print "yes":
    else:
          print "no"

```

The above program works only for the given string. I want it to be able to evaluate any string.