in reply to How can I count characters between two same substrings in a string where the substring is repeated more than 5 times?

$a="batcatratdeercatdogmousepalmcocoacatdoll monkeycatsusandollypollyc +atpomkelly";; print $-[2] - $+[1] while $a =~ m[(cat)(?=.+?(cat))]g;; 7 17 11 15

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

  • Comment on Re: How can I count characters between two same substrings in a string where the substring is repeated more than 5 times?
  • Download Code