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

Description


Curly brackets enable precise specification of character repetitions. {m} matches precisely m times (Case 1), {m,n} matches minimaly m times and maximaly n times (Case 2) and {m,}matches minimaly m times(Case 3). Im dritten Fall werden also alle Wörter gefunden, die mindestens 3 Zeichen zwischen a-z besitzen besitzen.

Source


One ring to bring them all and in the darkness bind them

Case 1


Regular Expression: .{5}
First match:One ring to bring them all and in the darkness bind them
All matches:One ring to bring them all and in the darkness bind them

Case 2


Regular Expression: [els]{1,3}
First match:One ring to bring them all and in the darkness bind them
All matches:One ring to bring them all and in the darkness bind them

Case 3


Regular Expression: [a-z]{3,}
First match:One ring to bring them all and in the darkness bind them
All matches:One ring to bring them all and in the darkness bind them