Homeโ€บQuizzesโ€บRegex Knowledge Quiz

Regex Knowledge Quiz

Developer Quiz

Test your regular expression knowledge with 12 questions on quantifiers, character classes, and anchors. Get instant explanations and your score in 3 minutes.

3 min ยท 12 questions

Question 1 of 12

What does the regex metacharacter `.` match?

Regular expressions are one of those tools every developer eventually needs, but the dense syntax โ€” quantifiers, character classes, anchors โ€” trips people up long after they've "learned" it once. This 12-question quiz checks how well you understand the building blocks of regex patterns, from basic quantifiers to character class negation and capturing groups. It takes about 3 minutes, with an explanation after every answer.

Once you've tested your knowledge, check a real pattern against sample input with the Regex Validator, or build one from a plain-language description with the Regex Generator.

Frequently Asked Questions

Each of the 12 questions has exactly one correct answer, and your final score is the number you got right out of 12. There's no partial credit, so read each option carefully.
No. The quiz runs entirely in your browser and nothing is sent to a server or stored. Refreshing the page resets your progress.
Most core syntax โ€” quantifiers, character classes, anchors โ€” is shared across languages like JavaScript, Python, and PCRE, but some features like lookbehind support or flag syntax differ between engines. It's worth checking the specific language's documentation for edge cases.
Not entirely โ€” most developers look up the exact syntax for less common features when needed, but understanding the core building blocks in this quiz (quantifiers, character classes, anchors, groups) lets you read and reason about most patterns you'll encounter.
The [Regex Validator](/regex-validator/) lets you test a pattern against sample input strings and see exactly what it matches, which is the fastest way to catch a pattern that's too broad or too narrow.
The [Regex Generator](/regex-generator/) can build a pattern from a plain-language description of what you want to match, which is often quicker than hand-writing one for common cases like emails, phone numbers, or dates.
Regex syntax is dense by design โ€” many single characters carry specific meaning โ€” so a pattern with several nested groups and quantifiers can look cryptic even to experienced developers. Breaking a complex pattern into smaller named pieces, where the language supports it, helps readability.
Yes, any time โ€” the questions stay the same, so it's a good way to confirm the core syntax has actually stuck.