Help for this page
perl -MYAPE::Regex::Explain -E 'say YAPE::Regex::Explain->new(qr/( \w){2}\1+\Z/)->explain();'
use strict; use warnings; ... substr( $string, $position + 3, length( $string ) - ( $position + 3 ), + '') if length( $string ) - $position > 3; say $string;