Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 [10pt] a) (5pt) Build a regular expression that captures any integer numbers in racket: 123 -456 0123 #b1011 #0777 #xf12abcdef #b-10 The number

image text in transcribed

Problem 2 [10pt] a) (5pt) Build a regular expression that captures any integer numbers in racket: 123 -456 0123 #b1011 #0777 #xf12abcdef #b-10 The number must follow these rules: 1. The number can be base 10 (by default) or base 2 (starting with #b) or base 8 (starting with #o) or base 16 (starting with #x). 2. The number can have arbitrary number of legal digits (for its base). Base 16 numbers can have (a,b,c,d,e,f) as its digits. 3. The number can have an optional '-'but it must be after the base indicator such as #x if there is one. b) (5pt) Build a regular expression that captures all non-empty sequences of letters other than "abc". For your convenience, you may use a "not" operator that takes a set of letters as argument and matches any other letter. For instance, not(abc) matches any letter other than a, b and c. Use' to match any letter

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago