Extract all valid email addresses from a given string using regex.
HardProblem Statement
Extract all valid email addresses from a given string using regex.
Sample Input
'Contact me at [email protected] or [email protected]'
Sample Output
["[email protected]", "[email protected]"]
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
def extract_emails(text)
# Your code here
end
Input
'Contact me at [email protected] or [email protected]'
Expected Output
["[email protected]", "[email protected]"]