F:\>perl -ne "while (m/\G.*?x(.)(?=x)/g) { print $1; }" axbxxcxdsxxxtx bcxt