Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
homework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sy520518
homework
Commits
47934f17
Commit
47934f17
authored
Apr 27, 2019
by
sy520518
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lesson4
parent
58541b27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
email.py
+24
-0
No files found.
email.py
0 → 100644
View file @
47934f17
"""
书写邮箱和手机号码匹配的正则
新浪:@sina.com、@sina.cn
网易:@163.com、@126.com、@163.net、@188.com
Yeah邮箱:@yeah.net
谷歌:@gmail.com、@googlemail.com
Microsoft:@hotmail.com
雅虎:@yahoo.com
新浪:@sina.com
搜狐:@sohu.com
Tom:@tom.com
21CN邮箱:@21cn.com
腾讯:@qq.com
263邮箱:@263.net
"""
import
re
email
=
input
(
"请输入邮箱进行验证:"
)
reg
=
"(^[a-zA-Z0-9
\
-]{5,16})@(((sina|163|188|qq|sohu|gmail|googlemail|hotmail|21cn|tom|yahoo)
\
.com)|((163|yeah|263)
\
.net)|(sina
\
.cn))"
result
=
re
.
findall
(
reg
,
email
)
if
result
:
print
(
"邮箱验证成功"
)
else
:
print
(
"邮箱验证失败"
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment