Skip to content

Commit f007319

Browse files
authored
Merge pull request #214 from bhaktichokshi/patch-mysql-query
Adding support for case sensitive regex syntax in MySQL valid email queries
2 parents 7a770eb + 2c0874a commit f007319

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MySQL/find-users-with-valid-e-mails.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
SELECT *
55
FROM users AS u
6-
WHERE u.mail REGEXP '^[a-zA-Z][a-zA-Z0-9._-]*@leetcode.com$';
6+
WHERE REGEXP_LIKE(u.mail, '^[a-zA-Z][a-zA-Z0-9._-]*@leetcode.com$', 'c');

MySQL/find-valid-emails.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# regular expression
55
SELECT user_id, email
66
FROM users
7-
WHERE email REGEXP '^[a-zA-Z0-9_]+@[a-zA-Z]+\.com$'
7+
WHERE REGEXP_LIKE(email, '^[a-zA-Z0-9_]+@[a-zA-Z]+\.com$', 'c')
88
ORDER BY 1;

0 commit comments

Comments
 (0)