DB<154> while ( /x(\d)x/g ) { print $1; pos($_) -= length($ &)-1 } 12345