Question: Write regular expressions for the following language. By word, we mean an alphabetic string separated from other words by white-space, any relevant punctuation, line breaks,
Write regular expressions for the following language. By word, we mean an alphabetic string separated from other words by white-space, any relevant punctuation, line breaks, and so forth.
(a) The set of all strings that represent prices in the UK, i.e., the pound sign followed by a real number which has optionally two digits after the decimal point. For example, 1500 and 19.99 .
(b) The set of all strings that start at the beginning of the line with a word and finish at the end of the line with the same word.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
