sub deibyz { my $match; while(/.*?(.+)(.?)((??{reverse$1})).*?/g){ $match = $1.$2.$3 if length($1.$2.$3)>length($match); } $match; } [download]
In reply to Re: Finding longest palindrome from a string by deibyz in thread Finding longest palindrome from a string by BUU