Ok. This covers every ipv6 and ipv4 address.
“^\s*((([0-9A-Fa-f]1,4}:){7}([0-9A-Fa-f]{1,4}:)6}(:[0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2}))|:))|(([0-9A-Fa-f]1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3}))?:((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))3})):)3}(((:[0-9A-Fa-f]{1,4}){1,4}))0,2}:((25[0-5]))|:))|(([0-9A-Fa-f]1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5}))0,3}:((25[0-5]))|:))|(([0-9A-Fa-f]1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6}))0,4}:((25[0-5]))|:))|(:(((:[0-9A-Fa-f]1,4}){1,7}))0,5}:((25[0-5]))|:)))(%.+)?\s*$”
Lord have mercy
IPv6 was a mistake. We should have just added an addition octet
That would allow for like, 2 trillion devices? Feels like a bandaid, my dude. Next you’re gonna suggest a giant ice cube in the ocean once a year to stop global warming.
So add two more octets:
Moat companies will still just use something like 10.0.13.37.0.1
IPv6 is not made with internal networks in mind lol
Never claimed it was, please quote me where I said as much
My dude, you used the 10.xx private IP as an example. Why wouldn’t they assume you were referring to internal networks?
I thought it was pretty clear with me adding 13.37 that I was making a joke, the earlier post spoke about how just adding one octet would still be too few addresses, so I joked about adding one more octet.
And nuke the hurricanes
Hurricanes cannot cross the equator. The equator is an imaginary line, and hence has zero mass. We can end every hurricane using zero point zero energy (0.0).
o.O
You could follow this logic and add 2 alphanumeric digits before 4 numeric octets. E.g. xf.192.168.1.1
This would at least keep it looking like an IP and not a Mac address. Another advantage would be graceful ipv4 handling with a reserved range starting with “ip” like ip.10.10.10.1
Oh yeah, great, let’s change the fundamental protocol on which all the networks in the world are based. Now two third of the devices in the world crashed because you tried to ping 192.168.0.0.1
that WOULD be quite funny for the first second or 2…
They played us for absolute fools!
Plus the MAC address
IPv
heared of ipv5?
Made that joke in an interview once.
They didn’t think it was funny. They truly thought Regex was the solution to, but never the cause of, all problems.
They wanted to make a Regex to verify every single address in the world. Dodged a bullet
Holy hell yeah you did. How would you go about doing that in a single expression? A bunch of back references to figure out the country? What if that’s not included? Oy.
You wouldn’t. It’s not possible. Which is what I told them.
And why would you want to? Legally if you change the given address, and it fails to get delivered - that is on you. Not them.
Some countries have addresses that are literally ‘Last house on the left by the Big Tree. Bumban(Neighborhood). NN (Country)’. Any US Centric validation would fail this but I assure you - mail gets delivered just fine.
The only valid regex is
(.+)
. Maybe add a separate country field (especially because some Americans wholeheartedly believe that the entire world should understand that “foobar, TX” means “foobar, Texas, United States”) (don’t get me started on states whose abbreviations are also ISO country codes).Unfortunately I guess business people only care about getting fewer support calls for missing shipping details, not correctness or a couple of calls from customers who live in the boonies. Then the proper answer is a form with a bunch of fields… which Americans will inevitably fuck up by making the “State” field mandatory despite most countries not having an equivalent.
What I’d really do is use one of those services that automatically fill on the address using google maps or whatever. Not perfect, probably not free, but a whole lot less work for presumably way fewer PEBCAKs from customers.
/.+(road|street).+/ resigns
It’s always a treat to debug a regex of that size.
I knew there would be someone with the regex.
You’re more of a perl programmer than network engineer :P
.*
Technically, this one also matches everything:
*exits the room*
0.0.0.0/0 0::0/0
You didn’t specify it couldn’t be in CIDR block notation…
::/0
Remember, when we abbreviate an ipv6 address all leading zeros are reduced to a single 0.
E.g
0003 would just become 03
When there are geoups of 4 zeros these can be represented as a single 0 or as a double colon ::
But we can only use the :: once so when summarizing an address containing multiple groups of 4 0s one after the other they can all be abbreviated to a single ::
Eg
fe80:0000:0000:0000:0210:5aff:feaa:20a2 would become fe80::210:5aff:feaa:20a2
Therefore it is perfectly valid to abbreviate an address of 0000:0000:0000:0000:0000:0000:0000:0000 /0 to just ::/0
Eh, I’ve seen some software internally prefer 0::0 instead of just ::0 or :: . Notation wise though you are correct, it is unnecessary.
0.0.0.0 /0 ::/0
SUCK MY DICK, GRU!
Haha spot on
deleted by creator
Its CIDR notation. So /0 means the subnet mask has no on bits and would read as 0.0.0 0 if you had a /1 that turns 1 bit on in the subnet mask, so it would be 128.0.0.0.
If i had a /24 which is the subnet mask used for most small networks like your home router. There would be 255 minus 2 addresses available for clients (phones, pcs etc) so the subnet mask would have 24 on bits and read 255.255.255.0, which you may be familiar with.
(Assuming you dont know much, not to insult you, you might know plenty), but when writing any kind of instructions or guides, i was always told to assume the reader knows absolutely nothing and miss nothing out.
This is the way.
:00
-:ff
Edit: Just learnt this can be also noted as:
::
-::f
What about IPv4
0.0.0.0/0
Better hope the goon hasn’t heard of IPv6 either, or you’re toast
Undefined
0.0.0.0/0
::/0
Winrar
Chicken dinrar?
0.0.0.0/0
1 and 0. Some assembly required.
32 or 128 of them, depending on protocol.
/32
That’s only 1 ip (single host)
0.0.0.0/0
one of them has a 7 I’m pretty sure
I’ll start.
0.0.0.1: Sophie
Your turn.
0.0.0.2 is Bob
0.0.0.3 is Clarence
0.0.0.4 is Darryl
127.0.0.1 is you
ipv6
0/0