I've been using a big regular expression and Java's regex classes (Pattern, Matcher, etc) to find IPv6s in large chunks of text. It works, but I'm thinking a custom algorithm designed to only find IPv6s could run much faster.

Anyone know of fast IPv6 find algorithm written in Java and in the public domain? It has to find all valid IPv6s in a String, collapsed and expanded.