Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task for this homework is to write one or more regular expressions to verify that a given string contains: (1) a valid currency (2)

Your task for this homework is to write one or more regular expressions to verify that a given string contains: (1) a valid currency (2) a valid date (3) a valid telephone number and it does not contain any html opening tags such as or closing tags such as Here are some examples of a valid currency:

$954.49 $10,724.00 $1,000,000.023.45 -$250,000.456 -$234,922.99 USD45M S2SK S4B Here are some examples of valid dates:

January 05, 1960 6/1/00 04-Jul, 2004 2021-20-01 Here are some examples of valid phone numbers:

6012664949 +1 601 266-4949 (601)-266-4949 001-601-266-4949 You can assume all valid values would look similar to the examples shown above. Write 4 different modules and name them as currency.js.

date.js.phone_numbers.js and tags.js.

Create an index.js file and import what you need from each module.

Create an input.txt file and use fs to read it.

Copy paste the above examples into input.txt and add additional text to each line.

For example, you could type, \"January 05, 1960 was a cold day, I suppose\" and \"I do remember 04-Jul, 2004.1\". Add examples for 4 different html tags.

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions