Easy Tutorial
❮ Prop Style Order Prop Body Vlink ❯

JavaScript RegExp ? Quantifier


Definition and Usage

The n ? quantifier matches any string that contains zero or one occurrence of n.

Syntax


Browser Support

All major browsers support the ? quantifier.


Example

Perform a global search for "1" followed by zero or one "0":

The marked text below shows where the expression matches: 1, 100 or 1000?


❮ Prop Style Order Prop Body Vlink ❯