The following code matches only the whitespaces but not newlines in the given string
Example
import re
print re.findall(r"(\s){1,}","""I find
Tutorialspoint useful""")Output
This gives the output
[' ', ' ', ' ']
The following code matches only the whitespaces but not newlines in the given string
import re
print re.findall(r"(\s){1,}","""I find
Tutorialspoint useful""")This gives the output
[' ', ' ', ' ']