Skip to content

Idea: Regex Golf #317

Description

@shri8977

Quest Name

Regex Golf -Write the Shortest Regex to Match/Reject String Sets

Proposed Filename

regex-golf.html

Category

JavaScript Fundamentals

Description

Regex Golf is an interactive quest that teaches regular expressions through progressively challenging puzzles.

Players are given two sets of strings:

  • ✅ Must Match
  • ❌ Must Not Match

Their objective is to write the shortest regular expression that correctly matches all valid strings while rejecting the invalid ones. Each level introduces new regex concepts such as literals, character classes, quantifiers, anchors, groups, alternation, and lookaheads, helping learners understand regex by experimentation rather than memorization.

Key Features

  • 10 progressively harder regex challenges
  • "Must Match" and "Must Not Match" string sets
  • Live regex validation while typing
  • Character count with shorter regex rewarded
  • Star-based scoring system
  • Hint system for difficult levels
  • Explanation after completing each challenge
  • Progress saved using localStorage
  • Responsive and keyboard accessible
  • Works completely offline

Suggested Difficulty

Medium

Tags

regex, javascript, interactive, puzzle, pattern-matching, learning, quest

References / Inspiration

No response

Pre-submission Checklist

  • I have checked existing quests and open issues for duplicates.
  • This quest can be built as a single self-contained HTML file.
  • This quest does not require a backend server to function.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions