Removing trailing whitespace in Eclipse

By Druss , 24 June, 2007

I suck at regex. But the fact that Eclipse leaves trailing whitespace everywhere is pretty fucking annoying. Although, this will apparently be solved in 3.3, that's still a month or so away (IIRC). Anyways, while I normally just use a $ regex search (whitespace switches don't like working in Eclipse's find dialog) to repeatedly weed out the bastards, today, I came across a more robust expression. Here goes:

Find: [\t ]+(?:(\n)|$)
Replace: $1

and Jesus wept (with joy).

All times are UTC. All content licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.