邮箱IP电话号码正则

# 配置IP
# 0.0.0.0 ~ 255.255.255.255
"^(([0-9]\.)|([1-9][0-9]\.)|(1[0-9][0-9]\.)|(2[0-4][0-9]\.)|(25[0-5]\.)){3}(([0-9])|([1-9][0-9])|(1[0-9][0-9])|(2[0-4][0-9])|(25[0-5]))$"     IP

# 0.0.0.0~999.999.999.999 
grep -P '(\d+\.){3}\d{1,3}' 1.txt

# 配置邮箱
grep '^[0-9a-Z_]*@[a-Z0-9_]*\.com$' 1.txt

grep -E '^[0-9a-Z_]+@[a-Z0-9_]+\.com+$' 1.txt
grep -E '^[0-9a-Z_]+@[a-Z0-9_]+\.[com]+$' 1.txt
grep -E '^[0-9a-Z_]+@[a-Z0-9_]+\.[a-z]+$' 1.txt
grep -E '^[0-9a-Z_]+@[a-Z0-9_]+.[a-z]+$' 1.txt

grep -P "\w+@\w+.[com]+" 1.txt
grep -P "\w+@\w+.com" 1.txt
grep -P "^\w+@\w+.com$" 1.txt

# 配置电话号码
grep  -P "1[3-9]\d{9}" 1.txt
grep  -E "1[3-9][0-9]{9}" 1.txt
grep  "1[3-9][0-9]\{9\}" 1.txt
上一篇:2017埙箫简谱清单分享(附音频Demo)


下一篇:中学之Vim实践课程