Define a regular expression for validating each of the following: a. A U.S. zip code, which must

Question:

Define a regular expression for validating each of the following:

a. A U.S. zip code, which must have five digits, followed by an optional hyphen and four digits. 

b. A telephone number in the format (aaa) nnn-nnnn, where aaa represents the area code and the ns represent digits.

c. The alphabetic derivation code illustrated in this chapter for a magazine subscriber. The format is 99999XXX9999XXX, where X represents a letter and 9 represents a number.


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Systems analysis and design

ISBN: 978-0136089162

8th Edition

Authors: kenneth e. kendall, julie e. kendall

Question Posted: