English | česky | >> Deutsch << | Español ZVON > Tutorials > Regular Expressions Tutorial
>> Beispiel 15 << | Zurück | Vor | Inhalt | Reguläre Ausdrücke

Beschreibung


Geschweifte Klammern ermöglichen eine exakte Angabe der Zeichenwiederholung (Quantifizierung). {m} trifft genau m mal (Fall 1), {m,n} findet mindestens m and maximal n mal (Fall 2) und {m,} findet mindestens m mal (Fall 3).

Quellcode


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

Fall 1


Regulärer Ausdruck: .{5}
Erster Treffer:One ring to bring them all and in the darkness bind them
Alle Treffer:One ring to bring them all and in the darkness bind them

Fall 2


Regulärer Ausdruck: [els]{1,3}
Erster Treffer:One ring to bring them all and in the darkness bind them
Alle Treffer:One ring to bring them all and in the darkness bind them

Fall 3


Regulärer Ausdruck: [a-z]{3,}
Erster Treffer:One ring to bring them all and in the darkness bind them
Alle Treffer:One ring to bring them all and in the darkness bind them