On Thu, Sep 21, 2006 at 10:50:58AM -0400, Jacob Haller wrote: > > > >How can I remove trailing spaces in the document? I think that this > >should be essential feature included in BBEdit, via menus, and maybe > >also included in preferences, to be able to select it to strip > >trailing spaces automatically upon saving the file. > > > >But for now, is there any other quick way? Regular expression? Thanks. > > Regular expression: > > Find ' +$' (a space followed by +$) and replace with nothing.
Methinks [\t ]+$ might be better as it will catch tabs. A little explaining is in order as one fluent in grep wouldn't have thought to ask the question in the first place. And this is an excellent example of what grep can do and why its so useful. [\t ] matches the characters listed inside [], a tab and a space. + for "one or more occurances" $ for end of line. -- David Kelly N4HHE, [EMAIL PROTECTED] ======================================================================== Whom computers would destroy, they must first drive mad. -- ------------------------------------------------------------------ Have a feature request? Not sure the software's working correctly? If so, please send mail to <[EMAIL PROTECTED]>, not to the list. List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> List archives: <http://www.listsearch.com/BBEditTalk.lasso> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
