Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!