I've personally never felt comfortable using regexes to solve production problems. The certificate code referenced here shows why:
https://github.com/mozilla-firefox/firefox/blob/d5979c2a5c2e...
Yikes.
replies(3):
https://github.com/mozilla-firefox/firefox/blob/d5979c2a5c2e...
Yikes.
Which is an error. Any ip like 2001:0000:0000::1 is going to be incorrect. It willingly produces errors. Whoever wrote this didn't even spend a few seconds thinking about the structure of IPv6 addresses.
> I don't see anything problematic with it.
Other than it being completely wrong and requiring a regex to be compiled for an amount of work that's certainly less than the compilation itself.
It's not. And the sequence you describe is not even parsed because colons are not part of the IPv6 extension of the SAN. PLease educate yourself before spilling such drivel.