In 31—39, write a regular expression to define the given set of strings. Use the shorthand notations given in the section whenever convenient. In most cases, your expression will describe other strings in addition to the given ones, but try to make your answer fit the given strings as closely as possible within reasonable space limitations.
39. All signed or unsigned numbers with or without a decimal point. A signed number has one of the prefixes + or —, and an unsigned number does not have a prefix. Represent the decimal point as \. to distinguish it from the single dot symbol for an arbitrary character.
Write a regular expression to define the given set of strings. Use the shorthand notations given in the section when ever convenient. In most cases, your expression will describe other strings in addition to the given ones. but try to make your answer fit the given strings as closely as possible wïthin reasonable space limitations.
All signed or unsigned numbers with or without a decimal point. A signed number has one of the prefixes
Given information:
All signed or unsigned numbers with or without a decimal point. A signed number has one of the prefixes
Concept used:
A signed number has one of the prefixes
Calculation:
It is required to write a regular expression using short hand notation to define a given set of strings which are expressed in words as “all signed or unsigned numbers with or without a decimal point. A signed number has one of the prefixes