Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

925 challenges 556 easy 323 medium 46 hard
Regular Expressions easy

Validate phone number

Write a function that uses regular expressions to determine if a given string is a valid US phone number.

regex validation phone
+10 pts 15m
Regular Expressions easy

Match IPv4 Address

Write a function that uses a regular expression to check if a string is a valid IPv4 address.

regex validation ipv4
+8 pts 12m
Regular Expressions easy

Validate Hex Color Code

Write a function that validates hex color codes using regular expressions.

regex validation strings
+10 pts 10m
Regular Expressions easy

Multiline anchor match

Extract lines beginning with a plain-text prefix from multiline strings using Python's re module.

regex anchors multiline
+10 pts 15m
Regular Expressions easy

Lookahead Validation

Write a regex-based function to check if a password meets length and character class requirements.

regex lookahead validation
+8 pts 10m
Regular Expressions easy

Match Balanced Parentheses with Regex

Write a function that uses regular expressions to determine if parentheses are balanced and properly nested.

regex strings validation
+10 pts 15m
Regular Expressions easy

Match scientific notation

Implement a function that checks if a string is in valid scientific notation.

regex validation scientific-notation
+10 pts 15m
Regular Expressions easy

Non-greedy quantifier

Implement a function that uses a non-greedy regex to extract the shortest substring between two delimiters.

regex lazy quantifier string parsing
+8 pts 10m
Regular Expressions easy

Named group extraction

Parse a log line into structured fields using named groups and re.match.

regex named-groups parsing
+8 pts 12m

Showing 1–9 of 9 challenges · easy · 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.