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

 6. a. Consider the regular expression given below. and explain how

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

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 Databases Questions!