Skip to content

Commit 2301730

Browse files
authored
Create find-valid-emails.sql
1 parent b6e385b commit 2301730

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

MySQL/find-valid-emails.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Time: O(n)
2+
# Space: O(n)
3+
4+
# regular expression
5+
SELECT user_id, email
6+
FROM users
7+
WHERE email REGEXP '^[a-zA-Z0-9_]+@[a-zA-Z]+\.com$'
8+
ORDER BY 1;

0 commit comments

Comments
 (0)