In python3, how do I match exactly whitespace character and not newline \n or tab \t?
I've seen the \s+[^\n] answer from Regex match space not \n answer, but for the following example it does not work:
a='rasd\nsa sd'
print(re.search(r'\s+[^ \n]',a))
Result is <_sre.SRE_Match object; span=(4, 6), match='\ns'>, which is the newline matched.
r'\s+[^ \n]'you have supplied was not even an accepted answer and Pythonredoes not support POSIX character classes like[[:blank:]]- Wiktor Stribiżew