Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is using regular expressions Problems (50 points) Lecture 7: Regular Expressions, part 2 1. 3 points) Write a regular expression for the language over

image text in transcribed this is using regular expressions
Problems (50 points) Lecture 7: Regular Expressions, part 2 1. 3 points) Write a regular expression for the language over a's and b's where the strings have an even number of a's or an even number of b's 2. (6 points) Write a regular expression for comments of the form /...../ (1) The comment begins with / and end with the first / encountered. (2) Optional whitespace can precede the comment or follow the comment, but nothing else. Whitespace consists of spaces and or tabs (\t). Don't include newline ( . (3) The text of the comments can include letters or digits, space, tab, underscore, and / (4) The comment can include /*. but we don't nest comments. (5) The star of the beginning /* cannot be the star of the ending /. (6) The symbol before the ending */ doesn't have to be whitespace. (7) Inside a regular expression, if you want a star symbol, escape it as \since just means Kleene star. (So within the expression, write to mean a slash followed by a star. As an expression, just/ means zero or more slashes Some strings that should fail to match: /* xyz */ */ / /* xyz / / By rules 1 and 2 By rules 1.2 and 4 By rule 5

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

Step: 3

blur-text-image

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

T Sql Window Functions For Data Analysis And Beyond

Authors: Itzik Ben Gan

2nd Edition

0135861446, 978-0135861448

More Books

Students also viewed these Databases questions

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago