EmEditor (text editor) Forum Index
   Questions and Answers about Macros
     remove trailing white characters
Register To Post

Threaded | Oldest First Previous Topic | Next Topic | Bottom
Poster Thread
user
Posted on: 5/22/2012 12:15 am
Home away from home
Joined: 9/29/2006
From:
Posts: 212
Re: remove trailing white characters
mmm, it doesnt work!

in a text like this:
sdf[5 spaces here]sdf
nothing happens!

any fix?
webern
Posted on: 5/21/2012 11:57 pm
Not too shy to talk
Joined: 11/23/2006
From: Moscow, Russia
Posts: 38
Re: remove trailing white characters
1.
document.selection.Replace("( |\\t)+?$"," ", eeReplaceAll | eeFindReplaceRegExp);

2.
document.selection.Replace("( |\\t)+?$","", eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("^( |\\t)+?","", eeReplaceAll | eeFindReplaceRegExp);
user
Posted on: 5/21/2012 10:32 pm
Home away from home
Joined: 9/29/2006
From:
Posts: 212
remove trailing white characters
hello!

can anyone write a script that will remove all trailing (one next to other) white characters (spaces, tabs, etc) and replace them with one space?

also remove all white characters in the begining and end of all lines (and not replace them with one space)

thanks!
Threaded | Oldest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文