- 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 write Python regular expression to check alphanumeric characters?
In Python there is a special sequence \w for matching alphanumeric and underscore when the LOCALE and UNICODE flags are not specified.
Example
import re result = re.search(r'^\w+$', 'Tutorials123') print result.group()
Output
Tutorials123
Advertisements