Question: 2. Write UNIX regular expressions describing the following languages. (a) Numbers with a mantissa followed by an optional exponent, where the mantissa has at least

2. Write UNIX regular expressions describing the following languages. (a) Numbers with a mantissa followed by an optional exponent, where the mantissa has at least one digit and an optional decimal point, and the exponent has an e or E optionally followed by a minus sign, followed by at least one digit. (b) Ruby variables, which start with either S or @ or a letter or underscore, followed by 0 or more letters, underscores, or digits. (c) The set of all strings of valid US phone numbers. Your expression should at least match the following strings: (555) 555-5555, 555-555-5555, (555)555-5555, 555.555.5555 (d) The set of all sentences in the sheep language, like "Baaaa!", "Baaaaaaaa!", and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
