Searching for \s\s*$ or \s+$ appears to match even if there is no such character. On the other hand *$ (two regular spaces, star, dollar) works correctly. However, the latter one is not able to find mixes of different trailing whitespaces.
\s\s*$
\s+$
*$
\s doesn't just match tabs and spaces. There are various other whitespace characters defined in UNICODE.
\s doesn't just match tabs and spaces. There are various other whitespace characters defined in UNICODE.