The following code matches tab and newline but not space from given string using regex.
Example
import re print re.findall(r"[\n\t]","""I find Tutorialspoint useful""")
Output
This gives the output
['\n']
The following code matches tab and newline but not space from given string using regex.
import re print re.findall(r"[\n\t]","""I find Tutorialspoint useful""")
This gives the output
['\n']