邮箱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
标签:grep,IP电话,9a,Z0,+.,正则,邮箱,txt,com 来源: https://www.cnblogs.com/whcc/p/15647814.html