Answered step by step
Verified Expert Solution
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
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
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