Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Extract all valid email addresses from a given string using regex.

Hard

Problem Statement

Extract all valid email addresses from a given string using regex.

Sample Input

'Contact me at [email protected] or [email protected]'

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
def extract_emails(text) # Your code here end
Log in or sign up to run or submit your code.Log inSign up
Input
'Contact me at [email protected] or [email protected]'
Expected Output
["[email protected]", "[email protected]"]