大家好,又见面了,我是你们的朋友全栈君。
手机靓号正则 ABC+ = 1234或12345… AAAA+ = 1111或11111…
AAAA+ / / ABC+DDD+ / /AA+BBB+//AABBCC//ABABAB
AAAA+ (\d)\1{3,} //如果想调3A+改{3,}改成{2,},想固定3A的话把{2,}的{,}号去掉 (1111+) ABC+DDD+ (?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){2,}\d(\d)\1{1,} (123+555+) AA+BBB+ ([\d])\1{1,}([\d])\2{2,} (11222/111222) AABBCC ([\d])\1{1}([\d])\2{1}([\d])\3{1} (115566) ABABAB (\d)((?!\1)\d)\1\2\1\2 (121212)
ABCDABCD (12341234) (?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){3}\d(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){3}\d
ABCABC (123123) (?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){2}\d(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){2}\d
ABC*ABC (1235123)
(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){
2}\d[\d](?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){
2}\d // 如果两个*的话在中间[\d]这个位置加一个[\d]
ABCD+ (?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)){3,}\d +DCBA (?:9(?=8)|8(?=7)|7(?=6)|6(?=5)|5(?=4)|4(?=3)|3(?=2)|2(?=1)|1(?=0)){3,}\d
AAA 结尾 \d{7}([0-9])(?!\1)([0-9])\2{2} AABB 结尾 \d{6}([0-9])(?!\1)([0-9])\2(?!\2)([0-9])\3 AA 结尾 \d{8}([0-9])(?!\1)([0-9])\2{1} ABAB 结尾 \d{7}([0-9])(?!\1)([0-9])\1\2 ABC 结尾 \d{7}([0-9]012|[0]123|[1]234|[2]345|[3]456|[4]567|[5]678|[^6]789) CBA 结尾 \d{7}([0-9]987|[9]876|[8]765|[7]654|[6]543|[5]432|[4]321|[^3]210)
“ab** ab**” “\d{3}(\d{2})(?!\1)(\d{2})\1(\d{2})” “如 2365 2374” “**ab **ab” “\d{5}(\d{2})(?!\1)(\d{2})\1” “结尾如 2356 8756”
“不带 4 和 7” “(0|1|2|3|5|6|8|9){11}” “不带 4 和 7” “不带 4 或 7” “(0|1|2|3|5|6|8|9){11}” “手机号码不带 4 或 7” “号段不带四,后四位带四” “1\d{2}[012356789]{4}(4\d{3}|\d4\d\d|\d\d4\d|\d{3}4)” “号段不带四,后四位带四” “号段带四,后四位不带四” “1\d{2}(4\d{3}|\d4\d\d|\d\d4\d|\d{3}4)[012356789]{4}” “号段带四,后四位不带四” “六拖二” “\d{2}([0-9])(?!\1)([0-9])\2{5}(?!\2)([0-9])\3” “如 33333322” “六拖一” “\d{3}([0-9])(?!\1)([0-9])\2{5}(?!\2)([0-9])” “如 5555554” “年份类” “\d{7}((19[5-9][0-9])|(20[0-1][0-9]))” “筛选年份特征的号码” “生日类” “\d{7}(?:0[13578]|1[02])(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)(?:0[1-9]|[12]\d|30)|02(?:0[1-9]|1\d|2[0-8])” “筛选生日特征的号码” “四拖二” “\d{4}([0-9])(?!\1)([0-9])\2{3}(?!\2)([0-9])\3” “结尾如 777744” “四拖一” “\d{5}([0-9])(?!\1)([0-9])\2{3}(?!\2)([0-9])” “结尾如 77774” “五拖二” “\d{3}([0-9])(?!\1)([0-9])\2{4}(?!\2)([0-9])\3” “如 4444422” “五拖一” “\d{4}([0-9])(?!\1)([0-9])\2{4}(?!\2)([0-9])” “结尾如 777774” “以 88 结尾” “\d{9}(88)” “以 88 结尾”
一杯茶,一包烟,一个BUG ,改一天
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/133493.html原文链接:https://javaforall.cn