Regular Expressions (Regex) – quiz with 15 questions

Read and build patterns: character classes, quantifiers, anchors and word boundaries, greedy versus lazy, groups, flags, and practical examples such as postcodes and mobile numbers – plus the ReDoS trap.

Questions
15
Level
Intermediate
Area
Programming & data · Programming languages

Modules

Sample question

Welche Eingabe passt vollständig auf den Ausdruck ^\d{4}$?

  • 8001
  • 80012
  • ZH80
  • 800

Correct: 8001. \d steht für eine Ziffer, {4} für genau vier Stück, ^ und $ für Anfang und Ende – passend für eine Schweizer Postleitzahl.

More questions from the quiz

  • Was bedeutet ein Punkt . ohne Backslash in einem regulären Ausdruck?
  • Was beschreibt die Zeichenklasse [A-Z]?
  • Was bedeutet [^0-9] in einem regulären Ausdruck?
  • Welches Kürzel steht für ein Leerraumzeichen wie Leerzeichen oder Tabulator?
  • Was unterscheidet die Quantoren * und +?

The questions and explanations are in German – checked by experts, not machine-translated.

After every answer, Quizbot explains why it is right or wrong. Open questions come first, and progress is counted per topic. The quiz is free of charge; no account is needed.

As of 15.11.2026 · All quizzes

Quizbot – a project by AI SYSTEM, St. Gallen · Home