3 ms·
I thought about that, but the docs don't mention anything about regexes and you may end up with some edge cases with leading 0s in each section. That would leav
by fencepost 10y ago
I thought about that, but the docs don't mention anything about regexes and you may end up with some edge cases with leading 0s in each section. That would leave you with 256+100+20 (256 non-padded, 100 2-digit numbers with leading 0, 10 digits with leading 0, 10 digits with 2 leading 0) which would fit. My immediate thought was that you'd catch a lot of invalid numbers as well, but simply having the "." prefix and suffix would mean you'd catch all possible middle octets which would do the trick while missing most of the phone number collision space (some people separate phone #s wtih ., but most of those probably don't start with 0-2).