I need a regex in Python2 to match only horizontal white spaces not newlines.
\\s matches all whitespaces including newlines.
>&
As there are fewer vertical white space characters (line terminators) than horizontal ones, it will be shorter to blacklist the first category than to white list the second category. But you still need to list a few more than just \n:
\n
[^\S\n\v\f\r\u2028\u2029]