Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(10 points) Write code that that lets you know if a string is an email address or not. Based on the definition from problem 1.

image text in transcribedimage text in transcribed

(10 points) Write code that that lets you know if a string is an email address or not. Based on the definition from problem 1. An email address identifies an email box to which messages are delivered. Every email address consists of 3 elements: local-part, @ symbol (pronounced as "at"), and domain name. The local-part is placed before the @ symbol, and the domain name is placed after the @symbol. For example, in the email johndoe@company.com, "johndoe" is the local-part, and "company.com" is the domain. Emails are invalid without these elements. The local-part or username contains: a. uppercase and lowercase Latin letters (A-Z, a-z); b. numeric values (from 0 to 9 ); c. special characters, such as \# !\% \$'\& +I=?_{} i. The period character (.) is valid for the local-part unless it is placed at the beginning or end of an email address. There also can't be two or more periods in a row A domain name consists of one or more parts separated by a dot and can contain: a. uppercase and lowercase Latin letters (A-Z, a-z); b. numeric values (from 0 to 9 ); c. a hyphen (-), on condition that it is not placed at the beginning or end of the domain 1. (9 points) Create a regular expression, DFA, and Regular Grammar for the local-part of the email address

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

=+2 How can the effectiveness of global virtual teams be improved?

Answered: 1 week ago

Question

=+1 What are the major issues related to international T&D?

Answered: 1 week ago