Question
Write regular expressions for the following languages using Gos regular expression syntax (using Go to test your answers would be a good idea). Use ^
Write regular expressions for the following languages using Gos 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. Note 2: however, treat regular expressions as not having a memory of what has been matched so far. This means, for example, that for the Reign in Tenochtitlan question below, if there are two years in the range, you cannot check if the 2nd year is greater than the first year. California Drivers License number: https://ntsi.com/drivers-license-format/ Links to an external site.has formats for all states Football results at https://www.49ers.com/schedule/Links to an external site. The results are on the right side, with a W for win, L for loss, and Im assuming T for tie The score is a pair of integers separated by a dash Valid sizes of sewing needles among other places, Sewing Machine Needle Sizes & Types Guide + Printable Chart (sewingmachinefun.com) Links to an external site.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 Idaho Drivers License number: defined in the NTSI link above. You need to cover both possibilities with one regular expression The years over which a particular Tenochtitlan ruler reigned see the Reign column of: List of rulers of Tenochtitlan - WikipediaLinks to an external site. 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 A line for one quantity on a Nutritional Facts label as described at: How to Understand and Use the Nutrition Facts Label | FDALinks to an external site. 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) A subset of valid chess moves in the algebraic notation: Algebraic notation (chess) - WikipediaLinks to an external site. Only represents simple moves, captures and the possibility of a check (a piece can attack the opponents 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 + 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 , use the three characters 1/2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started