Jaylene5189 Jaylene5189
  • 20-07-2019
  • Computers and Technology
contestada

What is a regular expression that would match any digit 1-999?

Respuesta :

Branta Branta
  • 31-07-2019

Answer:

[1-9][0-9]{0,2}

Explanation:

The numbers to be matched consist of three digits with the following requirements:

- Digit 1 can take the values 1-9

- Digit 2 can take the values 0-9

- Digit 3 can take the values 0-9

- Digits 2 and 3 are optional, that is the number may consist of 1,2 or 3 digits in all.

Taking these into account, the overall regular expression can be represented as follows:

[1-9][0-9]{0,2}

Answer Link

Otras preguntas

The Least Common Denominator (LCD) of the fractions 11/14 and 2/7 is  A.98 B.28 C.14 D.7 HELP QUICK PLZ
highly motivated individuals usually start an exercise plan at intensity A. low B.Moderate C.no D. full
wHAT TENSE ALLOWS FOR AN EVENT THAT BEGAN IN THE PAST TO CARRY INTO THE PRESENT MOMENT IN TIME
Which of the following would prevent Japanese intervention in its neighboring island of the Philippines? a. the Gentlemens Agreement b. the Roosevelt Corollary
Disintegration of the Austro-Hungarian Empire, creation of new nation-states in central Europe, and Germany’s loss of colonies were all consequences of (1)
How did Europeans view Marco Polo’s account of his time in China?
The information needed to direct the cell is found in ______. RNA Ribosomes Mitochondria DNA
Which of the following study topics would use MLA formatting
Which is the best example of a primary source document useful in the study of history?
Write in pence the value of the 9 in £8.90