我正在嘗試為特定字符串編寫一個(gè)正則表達(dá)式:要匹配的每個(gè)字符串應(yīng)從數(shù)字[1-9]開始,并且可能包含或可能不包含前綴。例如:0 - not match1 - match9 - match 2: - not match3:ABC - match4:56ARD20 - match5:56ARD20(any other chars except [0-9A-Z]) - not matchA:5GTS - not match (just a digits in the first part)A1:GRT - not match (just a digits in the first part):FDE3 - not match (first part should contain only digits): - not match (empty first digital part)因此,字符串的第一部分->僅是數(shù)字(強(qiáng)制性)。字符串可以包含一個(gè)帶后綴[0-9A-Z]的符號(hào)(:)。
數(shù)字,字母和:的正則表達(dá)式
寶慕林4294392
2021-05-13 14:10:21