This approach actually does not work, because the regex starts matching after the previous match. in other words, if the $seq is "foobar" it will find 'foo' and then 'bar' but not 'oob' or 'oba'.
Comment on Re^2: Question about speeding a regexp count