From
http://www.regular-expressions.info/charclass.html :
\s stands for "whitespace character". Again, which characters this actually includes, depends on the regex flavor. In all flavors discussed in this tutorial, it includes [ \t\r\n]. That is: \s will match a space, a tab or a line break. Some flavors include additional, rarely used non-printable characters such as vertical tab and form feed.
So it will eat the spaces and the next \n, etc as well. Hence try " +$" , which works for me.
Best, Paul
On 07/30/2010 12:47 AM, Erik de Castro Lopo wrote:
daspostloch wrote:
\s+$ seems to work for me, modulo some marking of white space in the next line on some occasions. is that what you mean by "doesnt seem to understand"?
Yes. I'm a refugee from the Nedit text editor. With the regex above with Nedit the search and replace of this (underscores as whitespace):
aaa___
bbbb______
would result in:
aaa bbbb
With Geany, it removes the empty line giving me this:
aaa bbbb
which is not really what I was after.
Erik