标签:
匹配单个数字(不能>10): \d
匹配>10的数字: \d+
"1-WIFI-MAC_Match 2-WIFI-MAC_Match_Trust 3-WIFI-MAC_Mismatch 4-WIFI-MAC_History_NegativeList 5-WIFI-MAC_Missing“ "1-CERTNO_Match_Sharing_Bad 2-CERTNO_Match_Trust_Self_Sharing_Bad 3-CERTNO_Match_Sharing_Good 4-CERTNO_Match_Trust_Self_Sharing_Good 5-CERTNO_Match_Recency_Bad 6-CERTNO_Match_Trust_Self_Recency_Bad 7-CERTNO_Match_Recency_Good 8-CERTNO_Match_Trust_Self_Recency_Good 9-CERTNO_Match_Reliability_Bad 10-CERTNO_Match_Trust_Self_Reliability_Bad 11-CERTNO_Match_Reliability_Good 12-CERTNO_Match_Trust_Self_Reliability_Good -1-获取失败"
匹配类似"1-IMSI_Match_Sharing_Bad","-1-获取失败":"(?:-1|\d+)(-[a-zA-Z\u4e00-\u9fa5_]+)+"
匹配第一部分数字: "(?:-1|\d+)"
匹配第二部分减号后面文字: "[-a-zA-Z\u4e00-\u9fa5_]+"
匹配"1-WIFI-MAC_Match": "(?m)^-?\d-(.*?)$"
"\\d-[a-zA-Z_\u4e00-\u9fa5]+$" 这个只能匹配: 全匹配1-a 1-啥 1-_
几点基础:
标签:
原文地址:http://www.cnblogs.com/x-poior/p/5332303.html