Validate Email Regex
Implement a function that validates email addresses using regex with specific rules.
Match IPv6 Address
Write a function that uses a regex to validate whether a string is a fully expanded IPv6 address.
Validate Hex Color Code
Write a function that validates hex color codes using regular expressions.
Multiline anchor match
Extract lines beginning with a plain-text prefix from multiline strings using Python's re module.
Showing 4 challenges · Regular Expressions
Regular Expressions — Python coding challenges
What you will find here
This page lists regular expressions challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.