Examveda

In a regular expression, what does the metacharacter `?` represent?

A. One or more occurrences of the preceding character or group

B. Zero occurrences of the preceding character or group

C. A fixed number of occurrences of the preceding character or group

D. Zero or one occurrence of the preceding character or group

Answer: Option D


This Question Belongs to Java Program >> Regular Expressions In Java

Join The Discussion

Related Questions on Regular Expressions in Java