- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to match whitespace but not newlines using Python regular expressions?
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
[' ', ' ', ' ']
Advertisements