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

Description


Several examples of "?" quantifier

Source


--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-

Case 1


Regular Expression: -X?XX?X
First match:--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-
All matches:--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-

Case 2


Regular Expression: -@?@?@?-
First match:--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-
All matches:--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-

Case 3


Regular Expression: [^@]@?@
First match:--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-
All matches:--XX-@-XX-@@-XX-@@@-XX-@@@@-XX-@@-@@-