Monday, March 31, 2008

IPv4/v6 Regular Expressions

I found these useful regexes in my notes. I probably found this somewhere on the Internet, but I forgot where.

IPv4 address


IPv6 address


Note that this does not work with shortened form such as dead::beef. dead:0000:0000:0000:0000:0000:0000:beef must be used instead.

No comments: