Finding repeated pattern

前端 未结 0 1407
有刺的猬
有刺的猬 2021-02-15 17:53

How can I find a repeated pattern in a string?

the input is:

aaaa
cacaca
abcd
aacc
cacc

output:

(a)4
(ca)3
none
(a)2
none
<         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题