in reply to Regex to find repeated patterns

So, what code have you already written and how does it fail to work for you?

perlretut and/or perlre might help, or maybe just split.