in reply to callback for regex engine
as documented in How can I count the number of occurrences of a substring within a string? in perlfaq4. I try to keep regular expressions short and sweet, and if I need really complex logic, I write that in Perl so that it's more than line noise to the casual observer.$count = $var =~ tr/s/s/;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|