我需要一個正則表達式來驗證應包含在asdot
符號的AS號作爲RFC 5396說明的web表單字段:正則表達式來驗證AS編號
asdot
refers to a syntax scheme of representing AS number values less than 65536 using asplain notation and representing AS number values equal to or greater than 65536 using asdot+ notation. Using asdot notation, an AS number of value 65526 would be represented as the string "65526" and an AS number of value 65546 would be represented as the string "1.10".
我想用正則表達式來使用Javascript RegExp object和Java EE javax.validation.constraints.Pattern。
這難以從驗證的正數與可選的小數部分是不同的。你有什麼試過,它是如何不起作用的? – tripleee
@tripleee我試過一些東西,但我不是一個正則表達式專家,我發現測試簡單的數字範圍非常困難(http://www.regular-expressions.info/numericranges.html) – logoff