後發現封信,我想編寫使用的Unix命令,正則表達式識別所有字符串不確認以下格式正則表達式下劃線
First Leter is UpperCase
Followed by any number of letters
Underscore
Followed by UpperCase Letter
Followed by any number of letters
Underscore
and so on .............
下劃線的數量是可變的
So valid ones are Invalid ones are
Alpha_Beta_Gamma alph_Beta_Gamma
Alpha_Beta_Gamma_Delta Alpha_beta_Gamma
Alppha_Beta Alpha_beta
Aliph_Theta_Pi_Chi_Ming Alpha_theta_Pi_Chi_Ming
「A_B_C」有效還是無效? 「ABC」呢? 'Abc'? 'AB_CD'?空的字符串? – 2010-09-08 13:51:24
A_B_C有效ABC無效Abc也無效,AB_CD無效應該是Ab_Cd – lisa 2010-09-08 14:05:16