
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 validate an email id using regular expression in Python?
The following code validates any given email id using regex in Python
Example
import re s = 'manogna.neelam@tutorialspoint.com' match = re.search(r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b', s, re.I) print match.group()
Output
This gives the output
manogna.neelam@tutorialspoint.com
- Related Questions & Answers
- How to extract email id from text using Python regular expression?
- How to validate an email address using Java regular expressions.
- Java regular expression program to validate an email including blank field valid as well
- How to validate a URL using regular expression in C#?
- How to write a Python Regular Expression to validate numbers?
- How to validate email using jQuery?
- How to validate an email address in PHP ?
- How to validate an email address in C#?
- Python program to validate email address
- How do you validate a URL with a regular expression in Python?
- How to validate email address in JavaScript?
- Extracting email addresses using regular expressions in Python
- How to validate Email Address in Android on EditText using Kotlin?
- Validate Email address in Java
- How to match a word in python using Regular Expression?
Advertisements