Original text:
ABCDEFG HIJKLMN OPQRSTU
Keeping 2 from start and 2 from end:
ABFG HIMN OPTU
Filenames:
document.pdf presentation.pptx spreadsheet.xlsx
Keeping all but last 4 characters:
document presentation spreadsheet