Regular Expression for IPv6 addresses

Richard E. Brown Richard.E.Brown at
Thu Feb 4 22:50:35 UTC 2010


My company, Dartware, have derived a regex for testing whether an IPv6 address  
is correct. I've posted it in my blog:

This has links to the regular expression, a (Perl) program that tests various  
correct and malformed addresses, and a Ruby implementation of the same.

Hope it's useful.

Rich Brown                    richard.e.brown at
Dartware, LLC       
66-7 Benning Street           Telephone: 603-643-9600
West Lebanon, NH 03784-3407   Fax: 603-643-2289

More information about the NANOG mailing list