perl -nle 'tr/a-z/A-Z/;$l=length();for $m(3..$l){for $c(0..($l-3)){last if $m+$c>$l;$f=substr($_,$c,$m);($r=reverse($f))=~s/s+//g;print "$.\t$_\t$c\t$m\t$f" if ($f eq $r);}}' example | more