>> English << | česky | Deutsch | Español ZVON > Tutorials > Regular Expressions Tutorial
>> Example 11 << | Prev | Next | Contents | Regular Expressions

Description


Quantifiers specify how many times a character can occur. Star * (Case 1) matches zero or more times, plus + (Case 2) once or more times and question mark ? (Case 3) zero or once.

Source


aabc abc bc

Case 1


Regular Expression: a*b
First match:aabc abc bc
All matches:aabc abc bc

Case 2


Regular Expression: a+b
First match:aabc abc bc
All matches:aabc abc bc

Case 3


Regular Expression: a?b
First match:aabc abc bc
All matches:aabc abc bc