On Mon, Jun 27, 2022 at 07:16:27PM +0200, Joost wrote: > On Mon, 27 Jun 2022, at 18:12, tomas@tuxteam.de wrote: > > Not a direct answer to your question, but perhaps similar. If you > > can live with selecting /lines/ containing a match, there's "occur" > > (M-x occur). > > Sorry, I meant to mention that, but I forgot. No, selecting lines is not an option, because it's the non-matching parts of each line that I'm trying to get rid of. > > In my particular use case, I'm trying to clean up a file that looks something like this: [...] I see. No, I don't know such a thing out of the box (that doesn't mean much, though). It shouldn't be that difficult to cobble something together. Cheers -- t