The question is from Chapter 15 of Systems Analysis and Design 8th edition by Ke
ID: 3558384 • Letter: T
Question
The question is from Chapter 15 of Systems Analysis and Design 8th edition by Kendall and Kendall.
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. A date in the form of day-month-year, where the month is a three-letter code and the year is four
digits. Hyphen must separate the day and month and year and month.
d. 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.
Explanation / Answer
a) ^d{5}-d{4}$
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.