Quantifiers used in Regular Expressions.

Quantifier

Matches

*

Matches zero or more occurrences of the preceding pattern.

+

Matches one or more occurrences of the preceding pattern.

?

Matches zero or one occurrences of the preceding pattern.

{n}

Matches exactly n occurrences of the preceding pattern.

{n,}

Matches at least n occurrences of the preceding pattern.

{n,m}

Matches between n and m (inclusive) occurrences of the preceding pattern.


Ebook Download
View all
Learn
View all