我試着寫一個正則表達式匹配以下:正則表達式表達字母字符匹配的第一個字符,其餘字母
must start with a letter
the rest must be alphanumeric
at least one character in length
max characters 12
如果我能夠匹配
a
k2jdj
hello
example72812
我試着寫一個正則表達式匹配以下:正則表達式表達字母字符匹配的第一個字符,其餘字母
must start with a letter
the rest must be alphanumeric
at least one character in length
max characters 12
如果我能夠匹配
a
k2jdj
hello
example72812
你可以試試
[a-zA-Z][a-zA-Z0-9]{0,11}
啊....你很快... – Kent 2013-03-07 22:28:25
謝謝!我正在啞巴,我一直在做^ [a-zA-Z] [a-zA-Z0-9] {1,12} $ – user1875195 2013-03-07 22:30:47
哦..答案有錯誤(錯字),應該是' 0-9'請修復它:) – Kent 2013-03-07 22:32:04
這個?
[a-zA-Z][a-zA-Z0-9]{0,11}
請發表您迄今嘗試過的內容。我建議閱讀http://www.regular-expressions.info/。 – 2013-03-07 22:24:06
好吧,這很容易:| – Qwerty 2013-03-08 00:27:59