#9869

Cirillo
Participant

Hello user!

You may want to use the following .jsee macro

//---Begin Macro---
Window.Redraw = false;

// remove trailing blanks (whitespaces, tabs ecc.) & their combos
document.selection.Replace ("([[:blank:]]){2,}", "1", eeFindReplaceRegExp | eeFindAround | eeReplaceAll | eeFindReplaceQuiet);

// remove StartOfLine blanks
document.selection.Replace ("^[[:blank:]]", "", eeFindReplaceRegExp | eeFindAround | eeReplaceAll | eeFindReplaceQuiet);

// remove EndOfLine blanks
document.selection.Replace ("[[:blank:]]$", "", eeFindReplaceRegExp | eeFindAround | eeReplaceAll | eeFindReplaceQuiet);

document.selection.StartOfDocument (false);
document.HighlightFind = false;
Window.Redraw = true;
//---End Macro---

Hope this will help.