So \s+$ includes both trailing spaces and tabs, right?
-blackcat
That's right. It's the same as
[:blank:]+$ - but this latter syntax, the so called POSIX notation, is not always supported.
What's the different with [ \t]+$
-blackcat
No difference again, although \s would theoretically match any other blank characters, if they existed
The real difference is in what a particular application supports. I've just found out for example that TotalCommander supports \s, but for some reason does not seem to understand \t - even though the help file says it does. I'll try again and report a bug if confirmed.
Another area where apps differ is in the interpretation of line breaks. In TextPad, a linebreak is \n, so the regex could also be written as
[ \t]+\nand you would replace that with
\nIn other text editors though \n may only mean the newline character. As you may know, in DOS and Windows the linebreak actually consists of two characters: caret return and new line. So some apps require you to spell them out:
[ \t]+\r\nand you would replace that with
\r\n