Use regular expression to implement a function which accepts a passed string
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Use regular expression to implement a function which accepts a passed string

Pass Task 2.3P: Email validation using regular expression

Task description:

Use regular expression to implement a function which accepts a passed string and check if it is a valid email address. A program accepts user’s input and calls the email validation function. If the email is valid, print out the email, username and host. (Rule: word characters (a-zA-Z0-9_ or “\w”), dot, and hyphen are considered as valid characters in an email address, besides of one & only one ‘@’.)

(Sample output as shown in the following figure is for demonstration purposes only.)


Submission:

Submit the following files to OnTrack:

1. Your program source code (e.g. task2-3.py)

2. A screen shot of your program running

Check the following things before submitting:

1. Add proper comments to your code

Hint
ComputerProgramming language is a formal language which consists of a set of strings that produce several kinds of the machine code output. These languages are used in the computer programming to implement the algorithms. These high-level programming languages include Python, JavaScript, PHP, C #, C++, COBOL, Perl, Pascal, LISP, FORTRAN, and Swift programming language. ...

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.