What will be the result when non greedy repetition is used on the pattern /a+?b/ ?

A Matches the letter b preceded by the fewest number of a’s possible
B Matches the letter b preceded by any number of a
C Matches letter a preceded by letter b, in the stack order
D None of the mentioned

Correct Answer: Matches the letter b preceded by the fewest number of a’s possible

Using non greedy repetition may not always produce the results you expect. /a+?b/ matches the letter b preceded by the fewest number of a’s possible.

Related Questions

'Greedy Jamuna' is used here to describe the-
Which of the following property is used to control the repetition of an image in the background?
The repetition of beginning consonant sound is know as------
The repetition of the beginning consonant sound is known as
The repetition of the initial consonant sound is own as---—

Next steps