我想寫一個大小寫不敏感的十六進制數的正則表達式,它應該匹配8或12或32的長度。正則表達式匹配8或12或32的十六進制數
The regex I have so far is:
/^[0-9A-F]{8}|[0-9A-F]{12}|[0-9A-F]{32}$/i
The pattern I am trying to test against is:
96AFC4ADA8C44A36B0CB1EC28531C3BC
or
870b72a9a020
or
569ac61e
但是這似乎不符合標準。
你能幫忙嗎?
感謝,
的可能重複[正則表達式正好n或m次] (http://stackoverflow.com/questions/13874777/regex-exactly-n-or-m-times) – HamZa