본문 바로가기
SQL

leetcode 1517. Find Users With Valid E-Mails

by 무적김두칠 2023. 6. 7.

https://leetcode.com/problems/find-users-with-valid-e-mails/solutions/748172/mysql-regexp-with-explanation/?envType=study-plan-v2&envId=top-sql-50 

 

1
2
3
4
# Write your MySQL query statement below
select *
from Users
where mail regexp '^[a-zA-Z][a-zA-Z0-9_.-]*@leetcode[.]com$'
cs

정규식에서 . dot은 임의의 문자 하나에 해당하는 사실..! 잊지 않고 푸시길 바랍니다
in the regular expression. The fact that dot corresponds to any single character..! I hope you don't forget

반응형

댓글