Question: Write regular expressions for the following languages using Go's regular expression syntax (using Go to test your answers would be a good idea). Use and

 Write regular expressions for the following languages using Go's regular expression

Write regular expressions for the following languages using Go's regular expression syntax (using Go to test your answers would be a good idea). Use and $ to get exact matches - NOTE 1: the goal of a regular expression is to not only match valid values, but also to "not" match invalid values. 1. California Driver's License number: https:/tsi.com/drivers-license-format/ B_. has formats for all states 2. Football results at https://www.49ers.com/schedule/. - The results are on the right side, with a W for win, L for loss, and I'm assuming T for tie - The score is a pair of integers separated by a dash 3. Valid sizes of sewing needles - among other places, Sewing.Machine Needle Sizes \& Types Guide + Printable Chart (sewingmachinefun.com). G.explains that the size is listed as - 2 numbers separated by a '/', European size before the /, American size after the / - The first number is 2 or 3 digits long - The second number is 1 or 2 digits long 4. Idaho Driver's License number: defined in the NTSI link above. You need to cover both possibilities with one regular expression 5. The years over which a particular Tenochtitlan ruler reigned - see the Reign column of: List of rulers of Tenochtitlan - Wikipedia - To make this slightly easier, just cover the possibilities in the 2nd section of rulers (the pre-imperial tlatoque) - Also, ignore the part describing the number of years of rule 6. A line for one quantity on a Nutritional Facts label as described at: How to Understand and Use the Nutrition Facts Label| FDA B - The line starts with what is being measured, like "Saturated Fat" or "Vitamin B12" - You do not need to cover other cases like the "added sugar" line - The next thing is the amount, with the amount and the unit of measurement, like "4.5g" or "1.6mg" - Lastly you have the percentage of the daily recommendation, like "23\%" or " 425% " (if you check a vitamin bottle, you get some of these) 7. A subset of valid chess moves in the algebraic notation: Algebraic notation (chess) - Wikipedia B. - Only represents simple moves, captures and the possibility of a "check" (a piece can attack the opponent's king) - The specific parts of the web page you can refer to are: - The introductory paragraph to the "Notation for Moves" section - The first paragraph of the "Captures" subsection, but just use " x " for captures and ignore the ":" option - The first sentence of the "Check" subsection - so only the part about " +" 8. Build on the previous question to represent all moves of an entire chess game. - You are only being graded here on the parts that combine the moves together. - Include the numbers for the moves - Include the final result, described in the "End of game" subsection. For 1/2, use the three characters 1/2

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!