Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. a. Consider the regular expression given below. and explain how the match occurs. Give three ITIN's that it matches, Individual Taxpayer Identification Number (ITIN)

image text in transcribed

6. a. Consider the regular expression given below. and explain how the match occurs. Give three ITIN's that it matches, Individual Taxpayer Identification Number (ITIN) Expression Description U.S. Individual Taxpayer Identification Number (ITIN) as defined in December 2006. The valid range is 900- 70-0000 through 999-88-9999, all numeric values. This regular expression will accept anything in this range with space, dash or no separators. b. Write a regular expression for decimal numbers as described below, using the regular expression recognizer in any programming language. Run your program on an input file, and have your program print all matches. A decimal number: -- begins with optional - sign (as in -21.1 or 21.1 but not +21.1) must include a decimal point, with digits before and after (0.0 but not 12. Or .12) - may include an exponent, which may have a -sign. (12.1e10 or 12.1E-121) For example, a sample input file with results could be: 3.14529 (OK) abc1.2 (1.2 OK) 123.12.123 (can find the 123.12) +12 -23.2 (OK) 1.2E.12 (can find -1.2)-12.0E!2 (finds -12.0E12) -12.E12 (no match)

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_2

Step: 3

blur-text-image_3

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

Ehs 2.0 Revolutionizing The Future Of Safety With Digital Technology

Authors: Tony Mudd

1st Edition

B0CN69B3HW, 979-8867463663

More Books

Students also viewed these Databases questions