Replace regexp capture-group in Notepad++? January 21, 2023 by Tarik Try using: ^((?:\b[A-Z]+\b\s+)+)(?:.*)(\d{8}) And replace with: \1\2